Closed webaddicto closed 6 years ago
Can't we just use setTimeout instead of hogging the cpu?
Made the changes, tested and working fine: https://github.com/dobarkod/cookie-banner/pull/67/commits/dc7738aa6dec107997ca23d4d8dbe42eff761670
Do you have problems with me renaming the option name (and related changes) to delay-before-close? I feel it would better describe what it does...
Absolutely no problem =)
Allows to set a sleep(milliseconds) before closing the cookie banner, example:
Useful to use with
accept-on-scroll
andaccept-on-click
, so the banner will wait (sleep) N milliseconds before being closed after an user has scrolled the page (accept-on-scroll) or triggered the onclick-event (accept-on-click).