diff --git a/lib/nexmo_developer/app/webpacker/packs/application.js b/lib/nexmo_developer/app/webpacker/packs/application.js index 00e91a48e..f16b036a1 100644 --- a/lib/nexmo_developer/app/webpacker/packs/application.js +++ b/lib/nexmo_developer/app/webpacker/packs/application.js @@ -165,17 +165,23 @@ $(document).ready(function() { // Manually close Coockies banner in Chrome 1 - 79 if (!!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime)) { - setTimeout(function() { + let checkCoockiesBanner = setInterval(function() { const coockiesBanner = document.querySelector('.optanon-alert-box-wrapper') if (coockiesBanner) { if (sessionStorage.getItem('coockiesBanner') === 'clicked') { coockiesBanner.style.display = 'none' + clearInterval(checkCoockiesBanner) + checkCoockiesBanner = 0 } const buttons = coockiesBanner.querySelectorAll('button') buttons.forEach((button) => { button.addEventListener('click', () => sessionStorage.setItem('coockiesBanner', 'clicked')) }) } - }, 100) + }, 50) + + setTimeout(() => { + clearInterval(checkCoockiesBanner) + }, 8000) } }); diff --git a/lib/nexmo_developer/version.rb b/lib/nexmo_developer/version.rb index 51f52bfd5..0c0d87272 100644 --- a/lib/nexmo_developer/version.rb +++ b/lib/nexmo_developer/version.rb @@ -1,3 +1,3 @@ module NexmoDeveloper - VERSION = '0.5.9'.freeze + VERSION = '0.5.10'.freeze end