1x1.gif
2x2.png
3x2.png
32x32.png
noop.css
noop.html
(noopframe
)noop.js
noop.json
1.53.5rc11noop.txt
noop-0.1s.mp3
noop-0.5s.mp3
noop-1s.mp4
noop-vast2.xml
1.59.1b6noop-vast3.xml
1.59.1b6noop-vast4.xml
1.59.1b6noop-vmap1.xml
1.33none
click2load.html
Object
properties (methods), altering them may not be the best idea (you should know what you are doing)./.?/
) if not specified./foo\x2cbar\u002cbaz/
, after 1.22.0 commas can be escaped by backslash character (foo\,bar
).application/javascript
if not present..js
from the scriptlet name in scriptlet injection filters (eventually in some future this will be the official way to do this).
.js
when the scriptlet is used with redirect=
, only when used in +js(...)
./img[a-z]{3,5}\.buzz/##+js(nowoif)
.filterAuthorMode
is set to true
.(log, 1)
tokens is deprecated:
info
and error
in filter input field can be used to reduce information displayed in the logger to informations and errors, including scriptlets, and with additional not
operator selected, the opposite effect can be achieved.wikipedia.org##+js(aeld)
trustedListPrefixes
.Aborts execution of inline script (throws ReferenceError
) when attempts to access specified property when text content or src
attribute value (new in 1.37.0) of <script>
element matches specified text or regular expression.
Note that acis.js
and abort-current-inline-script.js
aliases are deprecated and can be removed in the future.
Parameters:
.
) attached to window object accessed inside <script>
tag we want to break<script>
element contentsrc
attribute of the <script>
tag, when the attribute content is not a remote network address, but the actual inline script URL-encoded or base64-endcoded as a data:
URIExamples:
weristdeinfreund.de##+js(acis, Number.isNaN)
tichyseinblick.de##+js(acis, Math, /\}\s*\(.*?\b(self|this|window)\b.*?\)/)
Starting with 1.48.5b4, you can use the logging abilites. (deprecated)
(read about the new method of logging scriptlets)
Tokens:
log, 1
: output useful information at the dev console. (deprecated)debug, 1
: break at key locations in the scriptlet.Also see:
abort-on-property-read.js ↪Aborts execution of script (throws ReferenceError
) when attempts to read specified property. Writes are ignored.
Parameters:
.
) attached to window objectExamples:
tagesspiegel.de##+js(aopr, Notification)
Also see:
abort-on-property-write.js ↪Aborts execution of script (throws ReferenceError
) when attempts to write specified property.
Parameters:
.
) attached to window object that will be overwrittenExamples:
yggtorrent.*##+js(aopw, Fingerprint2)
Also see:
abort-on-stack-trace.js ↪ Experimental, under developmentNew in 1.29.3rc9
Aborts execution of script (throws ReferenceError
) when attempts to access specified property when stack trace matches specified text or regular expression. Internal discussion
Parameters:
.
) to trap in order to launch the stack trace matching code, ex. Math.random
!
to test for unmatched patterns in stack trace (New in 1.51.1b6)The scriptlet logs when there is a match. If verbose mode is enabled, it will log both matches/no matches.
Stack trace is normalized, but there still can be differences (Chromium vs Firefox) because of different format of stack trace.
There is a special string which can be used to match inline script context - inlineScript
.
Though the stack trace is rendered in the console using new line to separate the stack trace lines, internally \t
is used. The reason is to be more easily be able to create regex-based needle when using regex .
character class.
The stack trace is prepended with stackDepth:...
in order to allow to filter on stack depth, however higher depth values can likely differ between Chromium and Firefox.
Firefox often reports injectedScript
, attempt has been made to convert entries in Chromium which seems to correspond to this, so that both browser families will report injectedScript
.
The column value is normalized to 1, however there is too much discrepancy between browser families for that value to be of any use.
Filtering according to reported line numbers (...:1234:1
), will not be reliable for inline scripts, since the line at which those inline scripts are located will vary from one page to another. It should be reliable for when the stack trace entry is for code in a JS file.
Also see:
addEventListener-defuser.js ↪ prevent-addEventListener.jsPrevents attaching event listeners.
Parameters (when using positional arguments):
Examples:
vev.io##+js(aeld, adb.updated)
newser.com##+js(aeld, load, Object)
vivo.sx##+js(aeld, , preventDefault)
vidto.me##+js(aeld, /^(?:click|mousedown|mousemove|touchstart|touchend|touchmove)$/, system.popunder)
Tokens:
DOMContentLoaded
event ("interactive")load
event ("complete")window
and document
elements can be used as a selector (New in 1.58.1b5))▬▬► SPOILER START ◄▬▬
addEventListener()
is defusedaddEventListener()
Examples:
wikipedia.org##+js(aeld, /mouse/, /.^/, log, 2)
wikipedia.org##+js(aeld, , /.^/, log, 2)
wikipedia.org##+js(aeld, , , log, 1)
wikipedia.org##+js(aeld, _, , log, 3)
The first filter will log calls to addEventListener()
which have the pattern "mouse" in the event type (so "mouseover", "mouseout", etc.) without defusing any of them (because pattern can't match anything).
The second filter will log all calls without defusing any of them (because type can't match anything).
The third filter will log and defuse all calls to addEventListener()
The fourth filter will log all calls to addEventListener()
without defusing any of them
▬▬► SPOILER END ◄▬▬
(read about the new method of logging scriptlets)
Examples:
jpvhub.com##+js(aeld, click, popMagic, runAt, idle)
subkade.ir##+js(aeld, click, return"undefined", elements, a.indirect)
wikipedia.org##+js(aeld)
The third filter will log all calls to addEventListener()
without defusing any of them
Also see:
addEventListener-logger.js↪Removed in 1.48.1b3.
Logs to the console event listeners created on page.
The logging or debugging of addEventListener()
calls can now be done with the addEventListenerDefuser
scriptlet, which now supports named arguments.
Also see:
Removes current page cookies specified by name. For current domain, wildcard (dot) subdomain(s), after 1.28.0 also for domain one level above www
, current and /
path, script accessible (HttpOnly=false), on load and before unload.
Caveats: cookies set for higher level domain will not be removed. For example, if current page domain is page.example.com
, cookies set for example.com
will not be removed. One exception is www
subdomain, which will work after 1.28.0.
Parameters:
Tokens:
Examples:
subdivx.com##+js(cookie-remover, ref_cookie)
discovermagazine.com##+js(remove-cookie, AWSALBTG, when, scroll)
Also see:
Removed. Deprecated by $csp
network filter option.
Applies content security policy by inserting <meta http-equiv=Content-Security-Policy content="*directive*">
tag to html <head>
element. Read more at https://www.w3.org/TR/CSP2/#delivery-html-meta-element
Content Security Policy Quick Reference Guide
Parameters:
New in 1.48.1b0.
Prevents a call to an existing function from throwing an exception. It encloses existing functions in this block and ignores the exception:
try { [existing function] } catch() { [ignore when throws] }
It will return undefined
because returning variable is never set.
The exception will be caught by the scriptlet and neutralized. The first argument must be a reference to a function call. At the moment, the function call must exist at the time the scriptlet is called.
Parameters:
Examples:
example.com##+js(call-nothrow, Object.defineProperty)
Also see:
disable-newtab-links.js ↪Prevents creating new tabs/windows by deactivating links with target
attribute.
Parameters:
Examples:
there.to##+js(disable-newtab-links)
To prevent new tabs/windows by specifying the location URL, see: window-close-if.js
Also see:
New in 1.49.3rc15
Intercepts calls to eval()
and will work only if what is passed to eval
can be parsed as JSON.
For parameters, see: json-prune
When no "prune paths" argument (first parameter) is provided, the scriptlet is used for logging purpose and the "needle paths" argument (second parameter) is used to filter logging output.
Examples:
m.nivod4.tv##+js(evaldata-prune, entity.commercial)
Also see:
New in 1.51.1b14 * (fn)
[Documentation to be completed]
trusted-prune-inbound-object.js ↪New in 1.52.3rc0
To perform object pruning for any given call which has an object as argument (hence "inbound").
Parameters:
json-prune
)json-prune
)Varargs:
dontOverwrite, 1
: do not modify the target inbound object.stackToMatch
: string or regular expression that must match the current function call stack trace. Prepend pattern with !
to test for unmatched patterns in stack trace.Examples:
Remove title
and name
properties before passing the object to JSON.stringify
call:
example.org##+js(trusted-prune-inbound-object, JSON.stringify, 1, title name)
Remove status
property before passing the object to Object.keys
call but do not modify caller's instance of the object:
example.org##+js(trusted-prune-inbound-object, Object.keys, 1, status, , dontOverwrite, 1)
Also see:
trusted-prune-outbound-object.js ↪New in 1.52.3rc3
Essentially a complement of trusted-prune-inbound-object
added in 1.52.3rc0
To perform object pruning on any object returned synchronously by any given call.
Parameters:
json-prune
)json-prune
)The scriptlets json-prune
and evaldata-prune
essentially perform the same function, and will eventually be rewritten to internally delegate to generic trusted-prune-outbound-object
.
New in 1.23.0
Intercepts calls to JSON.parse()
and Response.json()
New in 1.31.0. If the result of the parsing is an Object, remove specified properties from the result before returning to the caller.
Parameters:
!
to test for unmatched patterns in stack trace (New in 1.51.1b6)A property in a list of properties can be a chain of properties, example: adpath.url.first
.
After 1.28.0, two special "wildcard tokens" have been added:
[]
: iterate in all elements in an array. To deal with cases where the property to remove is an element in an array. To remove adserver
object properties from array in following JSON payload:
{"playlist": [{"adserver": "first"},{"adserver": "second"}]}
Use:
+js(json-prune, playlist.[].adserver)
*
: iterate through all own properties of an object. For example, to deal with hard to predict random-named properties. To remove adserver
object properties from inside randomly named objects in following JSON payload:
{"playlist": {"random1": {"adserver": "first"}, "randomB": {"adserver": "second"}}}
Use:
+js(json-prune, playlist.*.adserver)
Version 1.57.0 extend syntax with two special token properties:
[-]
: remove an array entry if part right of [-]
matches the inspected item.{-}
: remove a property if part right of {-}
matches the inspected item.When used without parameters, will log current hostname + json payload to the logger.
New in 1.27.0 - second parameter can be used to limit logging to JSON payloads which stringified content match specified string or regular expression.
Tokens:
log, ...
: This extends logging capabilities of json-prune
scriptlet as follows: ...##+js(json-prune, a, b, stackNeedle, log, [logneedle], logstack, 1)
. Whereas before, the only way to log json-prune
usage was to skip providing the property chain: ...##+js(json-prune, , b)
Where b
was the expression to filter out logging output. With the extended logging capabilities, the logging output can be filtered out with logneedle
, which can be a regex literal. Additionally, to log the stack trace the stackNeedle
argument must be set to non-empty string. You can use /.^/
to log the stack trace without matching it (New in 1.51.1b5).Examples:
youthhealthmag.com##+js(json-prune, unit_list)
winfuture.de##+js(json-prune, adtagparameter, enabled)
imgsen.com##+js(json-prune, *, showTrkURL)
- will remove everything when needle matches, new in 1.35If the site uses eval
in lieu of JSON.parse
, see: evaldata-prune
Also see:
json-prune-fetch-response.js ↪New in 1.51.1rc1
Removes specified properties from the JSON response of a fetch call.
Syntax:
...##+js(json-prune-fetch-response, prune paths [, needle paths [, ...varargs ]])
For parameters, see: json-prune
Except that the stack
parameter is treated as a vararg.
Tokens:
name:value
where
name
is init
option namevalue
is string or regular expression for matching the value of the option passed to fetch call.!
to test for unmatched patterns in stack trace.Examples:
tumblr.com##+js(json-prune-fetch-response, response.timeline.elements.[-].advertiserId, , propsToMatch, url:/api/v2/tabs/for_you) nbc.com##+js(json-prune-fetch-response, avails, , propsToMatch, amazonaws.com)
Also see:
json-prune-xhr-response.js ↪New in 1.51.1rc3
Removes specified properties from the JSON response of a XMLHttpRequest
call.
For usage, see: json-prune-fetch-response
Example:
www.facebook.com##+js(json-prune-xhr-response, data.viewer.instream_video_ads data.scrubber, , propsToMatch, /api/graphql)
Also see:
Removes an element from the specified XML retrieved using fetch, xhr support was added in 1.49.3rc6.
New in 1.44.5b3
After 1.49.3rc16, it can also remove attributes.
Parameters:
Tokens:
log, 1
(deprecated, read about the new method of logging scriptlets)logdoc, 1
: Dumps the whole document being worked on to the loggerExamples:
cbs.com##+js(xml-prune, Period[id*="-roll-"][id*="-ad-"], , pubads.g.doubleclick.net/ondemand)
play.max.com##+js(xml-prune, xpath(//*[name()="Period"][not(.//*[name()="SegmentTimeline"])]), , .mpd)
example.com##+js(xml-prune, xpath(//*[name()="MPD"]/@mediaPresentationDuration), , .mpd, log, 1)
Also see:
New in 1.44.5b6
Sometimes sites serve real video content and video ads all in one place inside .m3u8
files. You can use m3u-prune
to remove those ad segments.
Examples:
player.theplatform.com##+js(m3u-prune, tvessaiprod.nbcuni.com, /theplatform\.com\/.*?\.m3u8/)
mephimtv.cc##+js(m3u-prune, /#EXT-X-DISCONTINUITY(.|\n){1\,100}#EXT-X-DISCONTINUITY/gm, mixed.m3u8)
If the first argument is a regex with multine flag set, the scriptlet will execute the regex against the whole text, and remove matching text from the whole text (New in 1.47.5b10).
If the matching text does not contain whole lines, the text won't be removed, i.e. it is not allowed to remove only part of a line.
Also see:
Prevent web pages from using eval()
, and report attempts to the logger. This should not be used as a generic filter due to the fact that it breaks many websites, including those using Cloudflare's DDoS protection.
Examples:
solowarez.org##+js(noeval)
Also see:
Prevent web pages from using eval()
.
Prevent web pages from using eval()
on specific matching payloads.
Parameters:
When used without parameters, will log calls to eval()
to the logger.
Examples:
orgyxxxhub.com##+js(noeval-if, replace)
Obsolete: FLoC ended its experiment in July of 2021.
New in 1.35.0.
Defuses Google FLoC ("Federated Learning of Cohorts") tracking. Read more on https://amifloced.org/
uBlock Origin (uBO) ensures FLoC is opt-in. The generic filter *##+js(no-floc)
in "uBlock filters -- Privacy" ensures the feature is disabled when using default settings/lists.
Users can opt-in to FLoC by adding a generic exception filter to their custom filters, #@#+js(no-floc)
; or they can opt-in only for a specific set of websites through a more specific exception filter:
example.com,shopping.example#@#+js(no-floc)
Solves uBlockOrigin/uBlock-issues#1553.
New in 1.31.3b9.
Defuses calls to fetch()
by returning a promise which always resolve to an empty response.
Parameters:
!
for negation (new in 1.59.1b13), matching in URL passed to fetch()
callname:value
pairs of init
option name and string/regular expression matching in value of that option passed to fetch()
call.true
to randomize the response, random 10-character string 1.51.1b15emptyObj
to return the response value as empty object 1.54.1rc2emptyArr
to return the response value as empty array 1.54.1rc2emptyStr
to return the response value as empty string 1.54.1rc2length:min[-max]
to fulfill the response with randomized text with length specified, limited to 500000 characters 1.54.1b1war:[name of resource]
to fulfill the response with the content of a web_accessible_resources resource 1.54.1b1ok
, supported values: false
, true
type
, supported values: "basic"
, "cors"
, "default"
, "error"
, "opaque"
statusText
, supported values: ""
, "Not Found"
. defaults to "OK"
when not overridden. 1.58.1rc5When used without parameters, the parameters passed to no-fetch-if
will be logged to the logger.
Examples:
example.com##+js(no-fetch-if, method:HEAD) example.com##+js(no-fetch-if, adsbygoogle.js) example.com##+js(no-fetch-if, !negatedValue) example.com##+js(no-fetch-if, adsbygoogle.js method:HEAD) example.com##+js(no-fetch-if, /adsbygoogle.js$/ method:/HEAD|POST/) example.com##+js(no-fetch-if, adsbygoogle.js, length:11000) example.com##+js(no-fetch-if, adsbygoogle.js, war:googlesyndication_adsbygoogle.js) example.com##+js(no-fetch-if, doubleclick, , '{"type": "opaque"}')
See also:
trusted-replace-xhr-response.js ↪New in 1.51.1rc3
Replaces response text content of xhr
requests if all given parameters match.
For usage, see: trusted-replace-fetch-response
Example:
in-jpn.com##+js(trusted-replace-xhr-response, /.*/, , pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?)
Also see:
trusted-replace-fetch-response.js ↪New in 1.51.1b8.
Replaces response text content of fetch
requests if all given parameters match.
Parameters:
responseText
that should be replaced. Possible values:
*
: match all text content*
will match all fetch callsname:value
where:
name
is init option namevalue
is string or regular expression for matching the value of the option passed to fetch callTokens:
includes, pattern
: replace only if pattern
match in the text response. Can be a plain string or a regex. 1.58.1b6Scriptlet does nothing if response body can't be converted to text.
Solves uBlockOrigin/uBlock-issues#2742.
Examples:
example.com##+js(trusted-replace-fetch-response, adb_detect:true, adb_detect:false, example.com)
example.com##+js(trusted-replace-fetch-response, /#EXT-X-VMAP-AD-BREAK[\s\S]*?/, #EXT-X-ENDLIST, example.com)
example.com##+js(trusted-replace-fetch-response, *, , 'method:GET')
example.com##+js(trusted-replace-fetch-response, /#EXT-X-VMAP-AD-BREAK[\s\S]*?/, #EXT-X-ENDLIST, '/\.m3u8/ method:/GET|HEAD/')
example.com##+js(trusted-replace-fetch-response, *, , another_domain.com)
Also see:
trusted-replace-argument.js ↪New in 1.55.1b18
Replace an argument passed to a method.
Syntax:
[...]##+js(trusted-replace-argument, propChain, argposRaw, argraw [,condition, pattern])
Parameters:
propChain
: The property chain to the function which argument must be replaced when called.argposRaw
: The zero-based position of the argument in the argument list. Use a negative number for a position relative to the last argument. Use literal this
to replace the value used in prototype
-based methods.argraw
: The replacement value, validated using the same heuristic as with the set-constant.js
scriptlet.
json:...
, the value will be the json-parsed string after json:
repl:/.../.../
, the target argument will be replaced according the regex-replacement directive following repl:
1.61.3b1If argposRaw
parameter is not declared, the scriptlet will log all calls to propChain
along with the arguments passed and will not replace the argument passed to the trapped method.
Tokens:
condition, pattern
: The replacement will occur only when pattern matches the target argument.Examples of usage:
alliptvlinks.com##+js(trusted-replace-argument, MutationObserver, 0, noopFunc)
scimagojr.com##+js(trusted-replace-argument, document.querySelector, 0, json:"body", condition, .ad-zone)
example.com##+js(trusted-replace-argument, String.prototype.split, this, repl:/&ads=1/&ads=0/, condition, ads_enabled=true)
String.prototype.split
method and regex-replace the string before the string is split, see example below.
var config = "ads_enabled=true&ads=1";
config.split("&");
// &ads=1 will be replaced with &ads=0
New in 1.27.0.
Defuses calls to requestAnimationFrame()
function when parameter:
!
and matches the stringified callback argument to requestAnimationFrame()
; OR!
and does not match the stringified callback argument to requestAnimationFrame()
.Parameters:
Use with /^/
parameter to defuse all calls unconditionally.
When used without parameters, will log calls to requestAnimationFrame()
to the logger.
Examples:
bloomberg.com##+js(norafif, paywall-inline-tout)
Also see:
New in 1.23.0
Defuses calls to setInterval()
function when parameters:
!
and match the setInterval()
argument; OR!
and do not match the setInterval()
argument.Parameters:
min-max
: matches if delay >= min and delay <= maxmin-
: matches if delay >= min-max
: matches if delay <= maxUse with /^/
parameter to defuse all calls unconditionally.
When used without parameters, will log calls to setInterval()
to the logger.
Examples:
jpidols.tv##+js(nosiif)
finanzen.*##+js(nosiif, nrWrapper)
yachtrevue.at##+js(nosiif, text/css, 10)
Also see:
New in 1.23.0
Defuses calls to setTimeout()
function when parameters:
!
and match the setTimeout()
argument; OR!
and do not match the setTimeout()
argument.Parameters:
min-max
: matches if delay >= min and delay <= maxmin-
: matches if delay >= min-max
: matches if delay <= maxUse with /^/
parameter to defuse all calls unconditionally.
When used without parameters, will log calls to setTimeout()
to the logger.
Test page: https://gorhill.github.io/uBlock/tests/scriptlet-injection-filters-1.html
Examples:
computerbild.de##+js(nostif, ())return)
lablue.*##+js(nostif, push, 500)
In 1.31.3b11 aliased as setTimeout-defuser.js
for backward compatibility.
Also see:
Disables WebRTC by preventing web pages from using RTCPeerConnection()
. Report attempts in console.
Examples:
x1337x.*##+js(nowebrtc)
Also see:
New in 1.63.1b0.
Conditionally prevent assignment to innerHTML
property.
Parameters:
selector
: The element must matches selector
for the prevention to take place.pattern
: A pattern to match against the assigned value. The pattern can be a plain string, or a regex. Prepend with !
to reverse the match condition.When verbose mode is enabled, the scriptlet will log the assigned value of the element.
Example:
example.com##+js(prevent-innerHTML, body, adblock)
New in 1.38.0.
Defuses XMLHttpRequest network requests by returning empty response. Based on no-fetch-if.js
.
Parameters:
!
for negation, matching in URL passed to XMLHttpRequest open()
callname:value
pairs of XMLHttpRequest method open()
parameter names (only method
and url
currently supported) and string/regular expression matching in value of passed argument.true
to randomize the response, random 10-character string 1.51.1b15emptyObj
to return the response value as empty object 1.54.1rc2emptyArr
to return the response value as empty array 1.54.1rc2emptyStr
to return the response value as empty string 1.54.1rc2length:min[-max]
to fulfill the response with randomized text with length specified, limited to 500000 characters 1.54.1b1war:[name of resource]
to fulfill the response with the content of a web_accessible_resources resource 1.51.1b16When used without parameters, the parameters passed to no-xhr-if
will be logged to the logger.
Examples:
example.com##+js(no-xhr-if, method:HEAD) example.com##+js(no-xhr-if, adsbygoogle.js) example.com##+js(no-xhr-if, adsbygoogle.js method:HEAD) example.com##+js(no-xhr-if, /adsbygoogle.js$/ method:/HEAD|POST/) example.com##+js(no-xhr-if, adsbygoogle.js, length:11000) example.com##+js(no-xhr-if, doubleclick.net/instream/ad_status.js, war:doubleclick_instream_ad_status.js)
Also see:
New in 1.60.1b3
Essentially the same as no-xhr-if
except that if the directive
argument is not a known token, it will be used as is as the response text of the xhr request, whereas prevent-xhr
returns an empty string when the directive is unknown.
Examples:
anitube.vip##+js(trusted-prevent-xhr, outbrain.com, outbrain) koramaup.com##+js(trusted-prevent-xhr, googlesyndication, 'a.getAttribute("data-ad-client")||""')
New in 1.50.1b16.
Sets the specified attribute on the specified elements. This scriptlet runs once when the page loads then afterward on DOM mutations.
Parameters:
attr
must be modified.''
: empty string (default)true
false
0 <= value < 32768
[other]
: copy the value from attribute other
on the same element. This allows to copy the value of one attribute to another attribute on the same element.Examples:
example.com##+js(set-attr, div.class > a.class, test-attribute, 0) example.com##+js(set-attr, a > img, src, [data-src])
Solves uBlockOrigin/uBlock-issues#2347.
Also see:
New in 1.60.1b17
Sets the specified attribute on the specified elements. This scriptlet runs once when the page loads then afterward on DOM mutations.
Parameters:
Examples:
Adds a class
attribute to the body element with the value some-class
.
example.com##+js(trusted-set-attr, body, class, some-class)
Adds a test-attribute
attribute to the body element with the value [true, true]
.
example.com##+js(trusted-set-attr, body, test-attribute, '[true, true]')
Also see:
Deprecated by :remove-attr()
Filter authors must use the new operator instead of the +js()
counterpart.
Removes attribute(s) from DOM tree node(s). By default will run only once when the initial HTML document has been completely loaded and parsed but sub-resources such as scripts, images, stylesheets and frames are still loading.
Parameters:
|
asap
: added in 1.36.1b2, execute as soon as possible, do not wait for DOM to become available.stay
: This tells the scriplet to stay active and act on document changes.complete
: This tells the scriplet to start acting only when the document is complete, i.e. once all secondary resources have been loaded.Examples:
userscloud.com##+js(ra, onclick, .btn-icon-stacked)
magesy.*,majesy.*##+js(ra, oncontextmenu)
zerodot1.gitlab.io##+js(ra, oncontextmenu|onselectstart|ondragstart)
example.com##+js(remove-attr, class, .j-mini-player, stay)
Also see:
Deprecated by :remove-class()
Filter authors must use the new operator instead of the +js()
counterpart.
New in 1.26.0.
Removes classes from DOM tree node(s). By default will run only once after page load. Syntax based on remove-attr.js
Parameters:
|
stay
: This tells the scriplet to stay and act on DOM changes, while the default behavior is to act only once when the document becomes interactive.complete
: This tells the scriplet to start acting only when the document is complete, i.e. once all secondary resources have been loaded, while the default is to start acting when the document is interactive - which is earlier than when the document is complete.Examples:
danskebank.fi##+js(rc, cookie-consent-banner-open, html)
Picture of the elementAlso see:
trusted-replace-node-text.js ↪New in 1.49.3b16
Replace text instance(s) with another text instance inside specific DOM nodes.
By default, the scriptlet will bail out when the document itself has been fully loaded, i.e. when DOMContentLoaded
event is fired.
The mutation observer of this scriptlet can be a significant overhead for pages with dynamically updated DOM, and in most cases the scriptlet is useful only for DOM changes occurring before the DOMContentLoaded
event, so the default is to quit out when that event is received ("quit out" means discarding the mutation observer and having the scriptlet garbage-collected by the JS engine).
Parameters:
Tokens:
includes, pattern
: A string or regex which must be found in the text content of the node in order for the substitution to occurexcludes, pattern
: A string or regex which must not be found in the text content of the node in order for the substitution to occursedCount, n
: This will cause the scriptlet to stop after n
instances of substitution. Since a mutation oberver is used by the scriptlet, it's advised to stop it whenever it becomes pointless. Default to zero, which means the scriptlet never stopsstay, 1
: Force the scriptlet to stay at work foreverquitAfter, ms
: This tells the scriptlet to quit ms
milliseconds after the page has been loaded, i.e. after the DOMContentLoaded
event has been firedlog, 1
: This will cause the scriptlet to output information at the console, useful as a debugging tool for filter authorsExamples:
example.com##+js(rpnt, #text, /^Advertisement$/)
example.com##+js(rpnt, #text, Example Domain, Changed, condition, Example, stay, 1)
example.com##+js(rpnt, script, /devtoolsDetector\.launch\(\)\;/, , sedCount, 1)
Related discussions:
Also see:
New in 1.49.3rc15
Remove the whole text of a DOM node.
By default, the scriptlet will bail out when the document itself has been fully loaded, i.e. when DOMContentLoaded
event is fired.
The mutation observer of this scriptlet can be a significant overhead for pages with dynamically updated DOM, and in most cases the scriptlet is useful only for DOM changes occurring before the DOMContentLoaded
event, so the default is to quit out when that event is received ("quit out" means discarding the mutation observer and having the scriptlet garbage-collected by the JS engine).
Parameters:
Optionally, extra pairs of parameters (tokens) can be used to modify the behavior of the scriptlet.
Tokens:
includes, pattern
: A string or regex which must be found in the text content of the node in order for the removing to occurexcludes, pattern
: A string or regex which must not be found in the text content of the node in order for the removing to occursedCount, n
: This will cause the scriptlet to stop after n
instances of removing. Since a mutation oberver is used by the scriptlet, it's advised to stop it whenever it becomes pointless. Default to zero, which means the scriptlet never stopsstay, 1
: Force the scriptlet to stay at work foreverquitAfter, ms
: This tells the scriptlet to quit ms
milliseconds after the page has been loaded, i.e. after the DOMContentLoaded
event has been firedlog, 1
: This will cause the scriptlet to output information at the console, useful as a debugging tool for filter authorsExamples:
example.com##+js(rmnt, #text, Example)
example.com##+js(rmnt, #text, Example, condition, Exa)
example.com##+js(rmnt, script, timeLeft)
Also see:
trusted-replace-outbound-text.js ↪New in 1.57.1b1
(currently alias trusted-rpot
is unsupported yet)
Replace the text in the outbound function call.
Parameters:
Tokens:
condition, pattern
: is a vararg which tells the scriptlet to act only if pattern
is found in the outbound text.encoding, base64
: Decode and encode outbound base64-encoded text before and after replacement. 1.58.1b3Examples:
www.reddit.com##+js(trusted-replace-outbound-text, JSON.stringify)
(logging only)www.reddit.com##+js(trusted-replace-outbound-text, JSON.stringify, '/"csrf_token":"[^"]+",/')
"csrf_token":"ed5ce21c7d7c95c8662c7844c0f4a4dc",
from the JSON payloadwww.reddit.com##+js(trusted-replace-outbound-text, JSON.stringify, '/(?<="csrf_token":")[^"]+?(?=")/')
orwww.reddit.com##+js(trusted-replace-outbound-text, JSON.stringify, '/("csrf_token":")(?:[^"]+?)(")/', /$1$2/)
ed5ce21c7d7c95c8662c7844c0f4a4dc
or any similiar value in "csrf_token":"..."
and removes it resulting in empty value: "csrf_token":""
www.reddit.com##+js(trusted-replace-outbound-text, JSON.stringify, '/(?<="adblock":{"enabled":)true/', false)
true
in "adblock":{"enabled":true
and replaces it with false
resulting in a new spoofed value: "adblock":{"enabled":false
example.com##+js(trusted-replace-outbound-text, eval, ads:true, ads:false, encoding, base64)
For instance, eval('"YWRzOnRydWU="')
which decoded value is 'ads:true', will return 'YWRzOmZhbHNl' which is 'ads:false' after decoding.When the replacement starts with json:
, it will be first decoded using JSON.parse() (since 1.59.1b8), example:
example.com##+js(trusted-replace-outbound-text, somefn, json:"ok")
The doublequotes are required since this is what JSON.parse() expects as a valid JSON string.
Solves related issues / discussions:
Also see:
New in 1.47.5b4
Set the href
attribute to a value found in the DOM at, or below the targeted a
element, and optionally with transformation steps.
Parameters:
href
property must be sanitized, if ALL the following conditions are met:
<a>
) elementhref
attributehttps
-based URLhref
property, and optionally the transformation steps to perform, otherwise the text content of the element will be used.
[name]
: Use the value of the attribute name
as the URL?name
: Use the value of the href
query parameter name
1.49.3rc15. Supports unwrapping query parameters recursively 1.58.1rc11urlskip
documentation 1.61.3b10Examples:
vk.com##+js(href-sanitizer, a[href^="/go?to="][title], [title])
vk.com##+js(href-sanitizer, a[href^="/away.php?to="][title], ?to)
<a href="https://app.adjust.com/2uo1qc?redirect=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dorg.mozilla.firefox&campaign=www.mozilla.org&adgroup=mobile-android-page">Text</a>
: mozilla.org##+js(href-sanitizer, a[href^="https://app.adjust.com/"][href*="?redirect="], ?redirect)
example.com##+js(href-sanitizer, a.clickTracker, ?r?u
example.org##+js(href-sanitizer, a[href*="/redirect"], ?url ?url -base64)
Solves Anti-redirect scriptlet for vk.com (href-sanitizer).
Also see:
New in 1.38.7b3
Attempts to defuse reloading of a document through a meta "refresh" tag. Will stop navigation (call window.stop()
) at specified delay.
Parameters:
Also see:
trusted-click-element.js ↪New in 1.53.5rc13
Clicks elements on webpages. Can target single or multiple elements in a sequence. The scriptlet will abort after 10s timeout or after all the elements have been clicked. Also hidden elements can be targeted.
Parameters:
>>>
to select elements inside shadow root. (New in 1.54.1b3)name:key[=value]
where the value is optional. Multiple conditions can be separated by comma. Prefix with !
to only click if the cookie/localStorage item does not exist. Supported names: 1.55.1b12
cookie
: test string or regex against cookieslocalStorage
: test string or regex against localStorageTokens:
log, 1
: This will cause the scriptlet to output information at the console, useful as a debugging tool for filter authors
(deprecated, read about the new method of logging scriptlets)
Examples:
example.com##+js(trusted-click-element, button.reject-all)
example.com##+js(trusted-click-element, '[for="CookiePurposes_1_"], [for="CookiePurposes_2_"], button.js-save')
example.com##+js(trusted-click-element, #cmpwrapper >>> .cmpboxbtnyes)
example.com##+js(trusted-click-element, #cmp-btn-accept, , 500)
example.com##+js(trusted-click-element, #cmp-btn-accept, !cookie:/^gpt_ppid[^=]+=/, 5000)
example.com##+js(trusted-click-element, button[name="agree"], 'cookie:cmpconsent, localStorage:promo=yes')
Also see:
Creates property and initializes it with a value from a predefined set.
Scriptlet will succeed only when:
undefined
(scriptlet is called early enough) or null
1.25.0 ORset.js
is undefined
or null
1.25.0 ORValue set by scriptlet can be overwritten by page script when:
undefined
or null
1.25.0 ANDundefined
or null
1.25.0 ANDParameters:
.
) attached to window objectundefined
false
true
null
2018-11-24noopFunc
- function with empty bodytrueFunc
- function returning truefalseFunc
- function returning falsethrowFunc
- function throwing an error1.59.1rc5''
- empty string2019-01-06[]
- empty array1.36{}
- empty object1.36▬▬► SPOILER START ◄▬▬
set-constant
, possible values:
interactive
, end
, 2
: set the constant when the event DOMContentInteractive
is firedcomplete
, idle
, 3
: set the constant when the event load
is fired▬▬► SPOILER END ◄▬▬
Tokens:
loading
or 1
: execute immediatelyinteractive
or end
or 2
: set the constant when the event DOMContentLoaded
is firedcomplete
or idle
or 3
: set the constant when the event load
is firedfunction
: the constant will be a function returning the specified value ( asFunction
is deprecated)callback
: the constant will be a function returning a function returning the specified value ( asCallback
is deprecated)resolved
: the constant will be a promise resolving to the specified value ( asResolved
is deprecated)rejected
: the constant will be a promise failing with the specified value ( asRejected
is deprecated)stack
parameter as a vararg, to be discussed,Examples:
kompetent.de##+js(set, Object.keys, trueFunc)
t-online.de##+js(set, abp, false)
identi.li##+js(set, t_spoiler, 0)
joysound.com##+js(set, document.body.oncopy, null, 3)
(deprecated)joysound.com##+js(set, document.body.oncopy, null, runAt, 3)
Also see:
trusted-set-constant.js ↪Behaves exactly like set-constant, except that any arbitrary JSON-compatible value can be set.
By default the value is treated as a string, which can be anything.
If the value starts with {
and ends with }
, the value will be JSON-parsed, and the value
property of the resulting object will be used. Since 1.59.1b9, { "value": ... }
can be replaced with json:
.
Solves: https://github.com/uBlockOrigin/uAssets/discussions/18185#discussioncomment-5977456
Examples:
example.com##+js(trusted-set, prop, { "value": 100000 })
example.com##+js(trusted-set, prop, '{ "value": [ "one", "two", 3 ]}')
example.com##+js(trusted-set, prop, { "value": { "url": "about:blank" }})
Also see:
trusted-suppress-native-method.js ↪New in 1.58.1rc0
This is a first draft version with current limitations:
Syntax:
example.org##+js(trusted-suppress-native-method, methodPath, signatureStr[, how[, stack]])
Parameters:
.
if needed). The property must be attached to window
.|
-separated argument matchers. Supported value types with corresponding matchers:
""
to match an empty string. Regexp patterns inside object matchers are not supported.To ignore specific argument, explicitly use whitespace as a matcher, e.g ' | |{"prop":"val"}'
to skip matching first and second arguments.
If signatureStr
parameter is not declared, the scriptlet will log all calls to methodPath
along with the arguments passed and will not prevent the trapped method.
Tokens:
abort
– default, aborts the call by throwing an error,prevent
– replaces the method call with the call of an empty function.debug
– triggers a debugger
statement and the target method is not suppressed. Useful to find out how the method is being called by the page's code.!
to test for unmatched patterns in stack trace.The scriptlet will log stack trace in uBO's logger when verbose mode is enabled.
Examples:
example.org##+js(trusted-suppress-native-method, localStorage.setItem, '/key/|"value"', prevent) example.org##+js(trusted-suppress-native-method, Object.prototype.hasOwnProperty, '"test"') example.org##+js(trusted-suppress-native-method, Node.prototype.appendChild, '{"id":"str"}', prevent) example.org##+js(trusted-suppress-native-method, Document.prototype.querySelectorAll, '"div"') example.org##+js(trusted-suppress-native-method, Array.prototype.concat, '[1, "str", true]') example.org##+js(trusted-suppress-native-method, sessionStorage.setItem, ' |"item-value"', abort, someFuncName)
localStorage.setItem('test-key', 'test-value')
call matching first argument by regexp pattern and the second one by substring.obj.hasOwnProperty('test')
call matching the first argument.Node.prototype.appendChild
call on element with the id test-id
by object matcher.document.querySelectorAll
calls with div
as the first argument.Array.prototype.concat([1, 'str', true, null])
calls by matching array argument contents.Also see:
trusted-override-element-method.js ↪New in 1.60.1b5
Override the behavior of a method on matching elements.
Parameters:
throw
: an exception will be thrown (throws ReferenceError
).debug
: triggers a debugger
statement if uBO's logger is opened. Useful for debugging purposes.Example:
streamsilk.com##+js(trusted-override-element-method, HTMLAnchorElement.prototype.click, a[target="_blank"][style])trusted-prevent-dom-bypass.js ↪
New in 1.60.1b4
Prevent the bypassing of uBO scriptlets through anonymous embedded context.
Ensure that a target method in the embedded context is using the corresponding parent context's method (which is assumed to be properly patched), or to replace the embedded context with that of the parent context.
Root issue: https://issues.chromium.org/issues/40202434
Parameters:
Examples:
##+js(trusted-prevent-dom-bypass, Element.prototype.append, open)
##+js(trusted-prevent-dom-bypass, Element.prototype.appendChild, XMLHttpRequest)
New in 1.50.1b0.
Sets a cookie with the specified name, value, and path. Double quotes surrouding the cookie value are allowed.
Parameters:
>= -32767 && <= 32767
(<= 15
up to 1.56.1b18, >= 0
up to 1.61.1b0)accept
/ reject
,accepted
2 / rejected
2 / notaccepted
2,allow
/ disallow
2 / deny
,allowed
2 / denied
,approved
5 / disapproved
5,checked
8 / unchecked
8,dismiss
/ dismissed
,enable
2 / disable
2,enabled
2 / disabled
2,essential
7 / nonessential
7,forbidden
9 / forever
9,hide
6 / hidden
6,necessary
4 / required
4,ok
,on
1 / off
1,true
/ t
3 / false
/ f
3,yes
/ y
/ no
/ n
,all
10 / none
10 / functional
10,granted
11 / done
11,decline
12 / declined
12,closed
13 / next
13 / mandatory
13,disagree
13 / agree
13/
: root pathnone
: to set no path at all1. 1.52.3b17
2. 1.52.3rc12
3. 1.53.1b8
4. 1.53.5rc5
5. 1.57.3rc1
6. 1.58.1b7
7. 1.58.1rc0
8. 1.59.1b5
9. 1.60.1b12 10. 1.61.3b10 11. 1.62 12. 1.62.1b1 13. 1.62.1b2
The scriptlet encodes cookie names and values, e.g value "{ test: 'value'}" becomes %7B%20test%3A%20'value'%7D
.
Tokens:
reload, 1
: the scriplet will force a reload of the webpage if the cookie being set was not already set.dontOverwrite, 1
: the scriptlet will not modify the cookie if it already exists.; Secure
will be automatically used when cookie names starts with __Secure-
or __Host-
(since 1.58.1b8).
Examples:
example.com##+js(set-cookie, CookieConsent, 1)
example.com##+js(set-cookie, gdpr-settings-cookie, true)
example.com##+js(set-cookie, cookie_consent, ok, none)
Also see:
Sets a cookie with arbitrary name and value, and with optional ability to offset cookie attribute 'expires' and set path.
New in 1.50.1b1.
Parameters:
$now$
keyword for setting current time in ms, e.g 1667915146503. Can be used inside a string since 1.58.1b0$currentDate$
keyword for setting current time as string, e.g 'Tue Nov 08 2022 13:53:19 GMT+0300'$currentISODate$
keyword for setting current time in ISO format as string, e.g '2024-07-07T12:10:00.641Z' (since 1.58.1rc0)1year
keyword for setting expiration date to one year1day
keyword for setting expiration date to one day/
; possible values:
/
: root pathnone
: to set no path at allVariadic parameters (must appears after required and optional parameters):
reload, 1
: the scriplet will force a reload of the webpage if the cookie being set was not already set.domain, [value]
: the scriptlet will set the domain of the cookie to value.dontOverwrite, 1
: the scriptlet will not modify the cookie if it already exists.; Secure
will be automatically used when cookie names starts with __Secure-
or __Host-
.
Examples:
example.com##+js(trusted-set-cookie, cmpconsent, 1-accept_1)
example.com##+js(trusted-set-cookie, cmpconsent, $now$)
example.com##+js(trusted-set-cookie, cmpconsent, '{"accepted":true,"expire":$now$}')
example.com##+js(trusted-set-cookie, cmpconsent, accept, 259200)
example.com##+js(trusted-set-cookie, cmpconsent, accept, 1year)
example.com##+js(trusted-set-cookie, cmpconsent, decline, , none)
The second and third filters will set a cookie with new Date().getTime()
value.
The forth and fifth filters will set a cookie which will expire in 3 days or 1 year.
The sixth filter sets a cookie with no path.
Also see:
set-local-storage-item.js ↪ set-session-storage-item.js ↪New in 1.50.1b4 and 1.50.1b12.
Set a local/session storage entry to a specific, allowed value. Scriptlet won't set item if storage is full. Double quotes surrouding the key value are allowed.
>= -32767 && <= 32767
(only <= 32767
up to 1.61.1b1)''
: empty stringundefined
, null
false
, true
on
, off
yes
, no
accept
, reject
1.57.3b9accepted
, rejected
1.57.3b9allowed
, denied
1.59.1b5set-cookie
1.59.1b5{}
: empty object[]
: empty array""
$remove$
: remove specific item from localStorageExamples:
example.com##+js(set-local-storage-item, player.live.current.mute, false)
example.com##+js(set-local-storage-item, exit-intent-marketing, 1)
example.com##+js(set-local-storage-item, foo, $remove$)
example.com##+js(set-session-storage-item, player.live.current.mute, false)
example.com##+js(set-session-storage-item, exit-intent-marketing, 1)
example.com##+js(set-session-storage-item, foo, $remove$)
Solves uBlockOrigin/uBlock-issues#2697.
Also see:
trusted-set-local-storage-item.js ↪ trusted-set-session-storage-item.js ↪New in 1.50.1b4 and 1.53.5rc7.
Parameters:
$now$
: keyword for setting current time in ms,Date.now()
and (new Date).getTime()
calls, can be used inside a string since 1.57.3b8$currentDate$
: keyword for setting string representation of the current date and time,Date()
and (new Date).toString()
calls, can be used inside a string since 1.57.3b8$currentISODate$
: keyword for setting string representation of the current date and time in ISO format,Date()
and (new Date).toISOString()
calls, can be used inside a string since 1.57.3b8Examples:
example.com##+js(trusted-set-local-storage-item, COOKIE_CONSENTS, {"preferences":3\,"flag":false})
example.com##+js(trusted-set-local-storage-item, providers, [16364\,88364])
example.com##+js(trusted-set-local-storage-item, player.live.current.play, $currentDate$)
example.com##+js(trusted-set-local-storage-item, ppu_main_none, '')
example.com##+js(trusted-set-session-storage-item, opd, 1.4)
Also see:
remove-cache-storage-item.js ↪New in 1.55.1b23
Removes cache storage item.
Syntax: ...##+js(remove-cache-storage-item, cacheNamePattern[, urlPattern])
Parameters:
cacheNamePattern
: the name of the cache to target. Plain string or regex.urlPattern
: the URL of the resource to remove. Plain string or regex.Reference: https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage
nano-setInterval-booster.js /Adjusts interval for specified setInterval()
callbacks.
Parameters:
*
will match any interval.Examples:
identi.li##+js(nano-sib, , ,0.02)
platinmods.*##+js(nano-sib)
1ink.cc##+js(nano-sib, mSec, 1050)
Also see:
Spoof the CSS property value when getComputedStyle()
or getBoundingClientRect()
are used.
Parameters:
Examples:
example.com##+js(spoof-css, .ad, clip-path, none) example.com##+js(spoof-css, .ad, _debug, 1)
There can be any number of selectors, grouped inside single quotes:
example.com##+js(spoof-css, 'a[href="x.com"], .ads, .bottom', clip-path, none)
There can be any number of property-name/property-value pairs, all separated by commas:
example.com##+js(spoof-css, .ad, clip-path, none, display, block)
Special properties: 1.61.1b4
_debug, 1
: Force the browser to break when getComputedStyle()
or getBoundingClientRect()
is called, useful to help pinpoint usage of those calls in the page's source code._rectx, value
: Spoof the DOMRect.x
returned by getBoundingClientRect()
._recty, value
: Spoof the DOMRect.y
returned by getBoundingClientRect()
._rectw, value
: Spoof the DOMRect.width
returned by getBoundingClientRect()
._recth, value
: Spoof the DOMRect.height
returned by getBoundingClientRect()
.If both _rectw
and width
are present in the list of properties to spoof, _rectw
will have precedence over width
in the spoofing of getBoundingClientRect()
output. Same for _recth
.
Solves uBlockOrigin/uBlock-issues#2618.
Also see:
New in 1.52.3b2
Prevent usage of specific or all (default) canvas APIs.
Syntax:
example.com##+js(prevent-canvas [, contextType])
Parameters:
contextType
: A specific type of canvas API to prevent (default to all APIs). Can be a string or regex which will be matched against the type used in getContext() call. Prepend with !
to test for no-match.Examples:
example.com##+js(prevent-canvas)
- prevents example.com
from accessing all canvas APIs*##+js(prevent-canvas, /webgl/)
- prevents access to any flavor of WebGL API, everywhereexample.com##+js(prevent-canvas, !2d)
- prevents example.com
from accessing any flavor of canvas API except 2d
References: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext
nano-setTimeout-booster.js /Adjusts delay for specified setTimeout()
callbacks.
Parameters:
*
will match any delay.Examples:
bdupload.*##+js(nano-stb)
imgrock.*##+js(nano-stb, /.?/, 4000)
Also see:
sharedWorker-defuser.js↪Removed. Deprecated by $csp
filter option.
Defuses sharedWorker by passing empty worker file (Blob URL) for specified worker URLs
Parameters:
Allows opening RTC connections to matching RTCIceServer only.
Parameters:
RTCIceServer
urls
, username
or credential
.New in 1.39.3b10.
Closes fresh browser tabs of the specified page. Can also be used to close tabs which have been opened from other applications. Can be narrowed down to specific path by parameter. Whole browser window will be closed if it's the last/only tab (depends on browser configuration).
Improvements:
window-close-if
scriptlet is a regex, the match will be against the whole location URL, otherwise the match will be against the part+query part of the location URL.Parameters:
Examples:
acestream.com##+js(window-close-if, /plan/select?popup=noads)
example.com##+js(window-close-if, /^/)
- will close all new tabs going to example.com
on any site.hostdl.com##+js(window-close-if, /^https?://(www\.)?hostdl\.com/)
- will close all new tabs matching either only base domain or www one (i.e. not login.hostdl.com
).Also see:
Prevent opening new windows by window.open()
when URL positively or negatively matches to specific string.
Improvements:
nowoif.js
alias is now available.null
.If the first argument is set to the special value debug
and the logger is opened, the scriptlet will trigger a debugger
statement and the prevention will not occur.
When used without parameters, will log calls to window.open()
to the logger.
Parameters:
!
for negation, matching in all parameters passed to window.open()
(all the arguments are joined as a single space-spearated string, and the result is used as the target for matching the pattern, new in 1.50.1b2), if not provided, all calls to window.open()
are prevented.window
object will be invalidated.obj
: Use an object
element instead of iframe
element (default) as a decoy to be used in place of a popup window, when the page requires a valid window
instance to be returned.blank
: Replace the url
parameter with about:blank
. 1.59.1b9Tokens:
log, 1
: Cause the scriptlet to log information regarding how window.open()
is used by the page on which the scriptlet is used.Examples:
file-up.org##+js(nowoif)
vidstream.*##+js(nowoif, !api?call=, 10, obj)
example.com##+js(nowoif, download-link, , , log, 1)
Also see:
Clears window.name
property which can be misused for tracking purposes.
Parameters:
Experimental, gets rid of overlay dialogs, works for ~30s after page load. Preferred way to handle overlays is to use standard cosmetic filters and optionally style injection.
Disables alert()
dialog boxes by redirecting messages to console.
Removes animation (artificial 8s delay) added to desktop pages supporting AMP, when ampproject.org scripts are blocked.
Fingerprintjs2 shim.
Also see: AdGuard fingerprintjs2
FingerprintJS v3 shim.
Also see: AdGuard fingerprintjs3
Defuses BlockAdblock. Prevents executing of eval()
on sets of predefined payloads.
Also see: AdGuard prevent-bab
Redirect resource. Defuses BAB 4.2b.
Also see: AdGuard prevent-bab2
Convenience, Sanitize FuckAdBlock
, BlockAdBlock
, SniffAdBlock
, fuckAdBlock
, blockAdBlock
, sniffAdBlock
properties. Often used as redirect in network filters. TODO: copy to redirect?
Also see: AdGuard prevent-fab-3.2.0
Convenience, sets static properties (PopAds
, popns
)
Also see: AdGuard set-popads-dummy
Convenience, abort-on-property-write.js (PopAds
, popns
), throws "magic
"
Also see: AdGuard prevent-popads-net
New in 1.41.0
Prebid-ads shim. canRunAds
/isAdBlockActive
?
Also see: AdGuard prebid-ads
These are smallest/shortest/fastest to execute files. Should be used in network filters as a parameter to $redirect
option. They purpose is to mislead page to think that real files have been served.
none
reserved token, can be used to disable specific redirect filters. Starting with 1.31.0, classic exception filters and badfilter
option can be used.
click2load.html
for embedded <iframe>
elements. New in 1.31.0 (also 2e5d32e9, 46d7f8a7). Frames redirected to this resource will not be collapsed, instead, widget with clickable and selectable frame source link will be displayed. Clicking the icon next to source link will open frame content in new tab. Clicking the widget content will unblock and load original frame content.
Example rules:
||ad.server.com/$script,redirect=noop.js,domain=www.google.com
||dailymotion.com$3p,frame,redirect=click2load.html,domain=lemonde.fr
for example video link:https://www.lemonde.fr/international/video/2024/08/23/en-images-le-discours-de-kamala-harris-pour-clore-la-convention-democrate_6291494_3210.html
||vimeo.com$3p,frame,redirect=click2load.html,domain=theregister.com
for example video link:https://www.theregister.com/2024/08/01/a_fresh_approach_for_container/
New in 1.27.0.
doubleclick_instream_ad_status.js / doubleclick.net/instream/ad_status.js↪ google-analytics.com/ga.js↪ google-analytics_analytics.js / google-analytics.com/analytics.js↪ google-analytics_inpage_linkid.js / google-analytics.com/inpage_linkid.js↪ google-analytics_cx_api.js / google-analytics.com/cx/api.js↪ googletagservices_gpt.js / googletagservices.com/gpt.js↪ googletagmanager_gtm.js / googletagmanager.com/gtm.js↪ googlesyndication_adsbygoogle.js / googlesyndication.com/adsbygoogle.js↪ scorecardresearch_beacon.js / scorecardresearch.com/beacon.js↪ widgets.outbrain.com/outbrain.js↪ disqus_forums_embed.js AND disqus_embed.js / disqus.com/forums/*/embed.js↪ AND disqus.com/embed.js↪Removed in 1.29.0.
Deprecated by general purpose scriptlets / outdated (please move to proper section if still used).
Deprecated, addEventListener-defuser
static.chartbeat.com/chartbeat.js↪Deprecated, sets static properties (pSUPERFLY.activity
, pSUPERFLY.virtualPage
)
Deprecated, sets static properties (adProtect
, uabpdl
, uabDetect
)
throw
: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/throweval()
: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/evalsetInterval()
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setIntervalsetTimeout()
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout)RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4