1document.addEventListener('DOMContentLoaded', function (event) { 2 var elNotice = document.querySelector('.fgwp-notice'); 3 var btnClose = elNotice ? elNotice.querySelector('.fgwp-notice__close') : null; 4 5 // Not always available, such as when in the Elementor Editor 6 if (elNotice) { 7 // After slight delay, show notice 8 if (shouldShow() || elNotice.classList.contains('fgwp-notice--always-show')) { 9 setTimeout(function () { 10 elNotice.classList.add('fgwp-notice--show'); 11 }, 1000); 12 } 13 14 // Add global listener for Regenerate button as it's added dynamically 15 if (btnClose) { 16 btnClose.addEventListener('click', function (e) { 17 // hide banner 18 elNotice.classList.remove('fgwp-notice--show'); 19 20 // save cookie 21 if ('undefined' !== typeof localStorage) { 22 localStorage.setItem('fgwp_notice_hidden', Date.now()); 23 } 24 }); 25 } 26 } 27 28 function shouldShow() { 29 var lastShown = Date.now(); 30 if ('undefined' !== typeof localStorage) { 31 lastShown = localStorage.getItem('fgwp_notice_hidden'); 32 } 33 var secondsDifference = Date.now() - lastShown; 34 var hoursDifference = Math.floor(secondsDifference / 1000 / 60 / 60); 35 return hoursDifference >= 12; 36 } 37});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.