Scriptlets
Scriptlets copied to clipboard
AdGuard scriptlets library
It could be useful in this case - https://github.com/AdguardTeam/AdguardFilters/issues/166126 Instead of allowing cookie notice and closing it, we could use `dispatchEvent()` to load video player. Something like: ```js function dispatchCustomEvent(event,...
The same as - https://github.com/AdguardTeam/Scriptlets/issues/417, but for `fetch`.
Similar to - https://github.com/AdguardTeam/Scriptlets/issues/350, but instead of using redirection resources which are limited, we could have a trusted scriptlet which will allow to set any content in `response`/`responseText`, and maybe...
### Introduction Since Netflix uses `Object.defineProperty` to define functions related to advertisement [^1], it seems that new scriptlet setting inbound and outbound of `Object.defineProperty` and `Object.defineProperties` is required for the...
Related to https://github.com/AdguardTeam/AdguardFilters/issues/175034 and https://github.com/AdguardTeam/AdguardFilters/issues/174876 These websites use `onreadystatechange` to check if 4 `events` were fired and `#%#//scriptlet('prevent-xhr', 'pagead2.googlesyndication.com')` doesn't work because currently only 2 `events` are invoked. Steps to...
Basically the same issue as here - https://github.com/AdguardTeam/Scriptlets/issues/199#issuecomment-1063271758, but for `response` (currently only `responseText` is modified). Steps to reproduce: 1. Add this rule: ``` example.org#%#//scriptlet('prevent-xhr', 'pagead2.googlesyndication.com') ``` 2. Go to...
This is required for tsurlfilter modifications, see https://github.com/AdguardTeam/tsurlfilter/blob/d992758fa44ff567a9d493424887a23ea641d085/packages/tsurlfilter/src/modifiers/redirect-modifier.ts#L60
uBlock Origin supports `example.org#@#+js()` to defuse all scriptlets in example.org. AdGuard should support `example.org#@%#//scriptlet()` or `example.org#@%#//scriptlet('')` to do the same thing and convert the first one into that. Furthermore, AdGuard...
For example, to replace this rule with a scriptlet: ``` audioteka.com,jastrzabpost.pl,deliciousmagazine.pl,finansowysupermarket.pl,genialne.pl,pysznosci.pl,nocowanie.pl#%#AG_onLoad(function(){if(!(-1
In some scriptlets which replace content (like `xml-prune`, `m3u-prune`, `trusted-replace-fetch-response`, `trusted-replace-node-text`, `trusted-replace-xhr-response`, maybe in others too) it would be useful if there would be additional option to log content before...