-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
There is a website - AdguardTeam/AdguardFilters#111383 which detects adblockers when googletagmanager.com/gtag/ (xmlhttprequest) is blocked.
Unfortunately, streamingcommunity.site#%#//scriptlet('prevent-xhr', 'googletagmanager.com') doesn't work correctly in this case and video player is broken.
If I'm not wrong, it's because website uses loadend event, so I guess that adding:
const loadEndEvent = new Event('loadend');
thisArg.dispatchEvent(loadEndEvent);here:
Scriptlets/src/scriptlets/prevent-xhr.js
Lines 128 to 134 in 8877b08
| setTimeout(() => { | |
| const stateEvent = new Event('readystatechange'); | |
| thisArg.dispatchEvent(stateEvent); | |
| const loadEvent = new Event('load'); | |
| thisArg.dispatchEvent(loadEvent); | |
| }, 1); |
should fixes this issue.
Reactions are currently unavailable