AdguardTeam / PopupBlocker

Popup blocking userscript
GNU Lesser General Public License v3.0
335 stars 30 forks source link

AdGuard Popup Blocker Beta is not compatible with specific abort-current-inline-script #290

Closed AdamWr closed 1 year ago

AdamWr commented 1 year ago

Steps to reproduce

  1. Install latest AdGuard Popup Blocker Beta (2.5.86)
  2. Add this rule to user rules:
    example.org#%#//scriptlet('abort-current-inline-script', 'EventTarget.prototype.addEventListener', 'qwertyTest')
  3. Go to - https://example.org/
  4. Run in browser console:
    document.documentElement.addEventListener("click", () => window.open(`/test`) );
  5. Click somewhere

Popup should be blocked, but it looks like that abort-current-inline-script with EventTarget.prototype.addEventListener causes that AdGuard Popup Blocker is broken.

Screenshot ![image](https://user-images.githubusercontent.com/29142494/233917388-476fdfac-f299-4387-8ef5-70ecfc067b16.png)

I'm not sure if it's correct place to report it, but this issue doesn't occur with stable version of popup blocker 2.5.71, so I'm reporting it here.

maximtop commented 1 year ago

@AdamWr Thank you, we will take care of it.