Scriptlets
Scriptlets copied to clipboard
AdGuard scriptlets library
To replace (like `trusted-replace-*` scriptlet) or prevent any script that is loaded via `HTMLScriptElement.prototype.src` (In Firefox, it is displayed as `blob:/`), I think that mocking settering any primitive value as...
Currently when a rule like this is used: ```adblock example.com#%#//scriptlet('abort-on-stack-trace', 'foo.bar', 'whatever') ``` then `foo` is set to `window`, but it should be `undefined`. Screenshot I'm not sure, but perhaps...
Ref https://github.com/AdguardTeam/AdguardFilters/issues/211052 and https://github.com/AdguardTeam/Scriptlets/issues/512
Steps to reproduce: 1. Add to user rules: ```adblock example.org##h1 example.org#%#//scriptlet('spoof-css', 'h1', 'display', 'block') ``` 2. Go to - https://example.org/ 3. In console run: ```js document.querySelector('h1').checkVisibility() ``` It returns `false`...
In the default AgGuard filters, there is a rule like `...#%#//scriptlet('abort-current-inline-script', 'globalThis', 'break;case')` (from [here](https://github.com/AdguardTeam/AdguardFilters/blob/6a85024f295ab75ff901d28a479314a45df97cbb/BaseFilter/sections/general_extensions.txt#L252)). This prevents the TamperMonkey extension to load user scripts on the target sites because the...
YouTube uses pageview api to show popup "Video paused. Continue watching?" when user is not interacting with the page. /// disable-pageview-api.js (function(){ // based on https://addons.mozilla.org/en-US/firefox/addon/disable-page-visibility/ // visibilitychange events are...
### Prerequisites - [x] This site DOES NOT contain sexually explicit material, otherwise use [NSFW-specific form](./new?template=bug_report_NSFW.yml); - [x] Filters were updated before reproducing an issue; - [x] AdGuard product version...
AdGuard for Windows 7.21.0 nightly 56 (5050) (CL 1.17.158, DL 2.6.8 ) With a browser extension works. Does not work: ``` afisha.yandex.ru#%#//scriptlet('set-local-storage-item-reload', 'test', '1') ``` We need a reload option...
Similar to https://github.com/AdguardTeam/Scriptlets/issues/457 but about `trusted-create-element`. Steps to reproduce: 1. Add this rule: ```adblock youtube.com#%#//scriptlet('trusted-create-element', 'head', 'script', '', 'alert(1)') ``` 2. Go to - https://www.youtube.com/ Alert message should be displayed...
https://github.com/AdguardTeam/AdguardFilters/issues/205139