AdguardTeam / Scriptlets

AdGuard scriptlets library
GNU General Public License v3.0
150 stars 29 forks source link

Fix 'log-addEventListener' — no addEventListener call logging in Firefox #446

Open ghajini opened 2 months ago

ghajini commented 2 months ago

URL= https://exego.app/GdvGUG, https://evernia.site/GdvGUG there are popups on page, if i use following rules

exego.app,evernia.site#%#//scriptlet('abort-current-inline-script', 'navigator', 'FingerprintJS')
exego.app,evernia.site#%#//scriptlet('log-addEventListener')
evernia.site#%#//scriptlet('prevent-fetch', 'adsbygoogle')

exego.app,evernia.site#%#//scriptlet('log-addEventListener') do not log addEventListener call (wrt following script) on firefox as compared with opera/chrome

<script>
window.shouldOpenPopUp = true;
function openPopup(event) {
  if (window.shouldOpenPopUp) {
    event.preventDefault();
    event.stopImmediatePropagation();
    window.shouldOpenPopUp = false;
    setTimeout(() => {
      window.shouldOpenPopUp = true;
    }, 12000)    // Create and click the link
    const a = document.createElement('a');
    a.href = 'https://cvrtu6ee.pro/?aD1jNzViM2EyYWNiYjdlYWZlYjVjNTQyMGY4ZDg4YjBiMyZ1c2VyPTE5NCZzaWQ9OTImdHlwZT1jJmFkY29kZT0yJnRtcD01&file=exe';
    a.target = '_blank';
    a.style.display = 'none';
    document.body.appendChild(a);
    a.click();
    document.body.removeChild(a);
  }
}
document.body.addEventListener('click', openPopup);
</script>

firefox= Untitled12

opera= Untitled122

iam not able to see ,what happens for firefox?

ghajini commented 2 months ago

when Disable cache is enabled from network tools ,issue does not occur