Resources Library·续7

edit-this-object

Prune properties from an object through one of the object's own method.

Parameters: - Required, property chain of the method to trap. - Required, a uBO-flavored JSONPath query.

edit-element-object

Prune properties of one or more elements matching a specific selector.

Parameters: - Required, the selector used to locate the elements on which the JSONPath query will be applied. - Required, a uBO-flavored JSONPath query. - Optional, a time in milliseconds after which the scriplet will stop trying to find matching elements.

json-edit

Edit object generated through JSON.parse(). Properties can only be removed.

Parameters: - required, a uBO-flavored JSONPath query.

json-edit-xhr-response

Edit the object fetched through a XHR instance.

Parameters: - Required, a uBO-flavored JSONPath query. - Optional, varargs (name: value): - propsToMatch: a space-separated list of key:value pairs which must match for the editing take place

json-edit-xhr-request

Edit the object sent as the body in a XHR instance.

Parameters: - Required, a uBO-flavored JSONPath query. - Optional, varargs (name: value): - propsToMatch: a space-separated list of key:value pairs which must match for the editing take place

json-edit-fetch-response

Edit the object fetched through the fetch API.

Parameters: - Required, a uBO-flavored JSONPath query. - Optional, varargs (name: value): - propsToMatch: a space-separated list of key:value pairs which must match for the editing take place

json-edit-fetch-request

Edit the request body sent through the fetch API.

Parameters: - Required, a uBO-flavored JSONPath query. - Optional, varargs (name: value): - propsToMatch: a space-separated list of key:value pairs which must match for the editing take place

jsonl-edit-xhr-response

Edit the objects found in a JSONL resource fetched through a XHR instance.

Parameters: - Required, a uBO-flavored JSONPath query. - Optional, varargs (name: value): - propsToMatch: a space-separated list of key:value pairs which must match for the editing take place

jsonl-edit-fetch-response

Edit the objects found in a JSONL resource fetched through the fetch API.

Parameters: - Required, a uBO-flavored JSONPath query. - Optional, varargs (name: value): - propsToMatch: a space-separated list of key:value pairs which must match for the editing take place


Defuser scriptlets

ampproject_v0.js /

~ampproject.org/v0.js~ ↪

Removes animation (artificial 8s delay) added to desktop pages supporting AMP, when ampproject.org scripts are blocked.

fingerprint2.js ↪

Fingerprintjs2 shim.

Also see: AdGuard fingerprintjs2

fingerprint3.js ↪

FingerprintJS v3 shim.

Also see: AdGuard fingerprintjs3

nobab.js /

~bab-defuser.js~ ↪

Defuses BlockAdblock. Prevents executing of eval() on sets of predefined payloads.

Also see: AdGuard prevent-bab

nobab2.js ↪

Redirect resource. Defuses BAB 4.2b.

Also see: AdGuard prevent-bab2

nofab.js /

~fuckadblock.js-3.2.0~ ↪

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

popads-dummy.js ↪

Convenience, sets static properties (PopAds, popns)

Also see: AdGuard set-popads-dummy

popads.js /

~popads.net.js~ ↪

Convenience, abort-on-property-write.js (PopAds, popns), throws "magic"

Also see: AdGuard prevent-popads-net

prebid-ads.js ↪

New in 1.41.0

Prebid-ads shim. canRunAds/isAdBlockActive?

Also see: AdGuard prebid-ads

Empty redirect resources

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.

Available resources

  • Images
  • Source code
    • noop.css ↪
    • noop.html ↪
    • noop.js ↪
    • noop.json ↪
    • noop.txt ↪
    • noop-vast2.xml ↪
    • noop-vast3.xml ↪
    • noop-vast4.xml ↪
    • noop-vmap1.xml ↪
  • Media files
    • noop-0.1s.mp3 ↪
    • noop-0.5s.mp3 ↪
    • noop-1s.mp4 ↪
  • Special purpose
    • 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/

URL-specific sanitized redirect resources (surrogates)

amazon_ads.js /

~amazon-adsystem.com/aax2/amzn_ads.js~ ↪

amazon_apstag.js ↪

New in 1.27.0.

doubleclick_instream_ad_status.js /

~doubleclick.net/instream/ad_status.js~ ↪

google-analytics_ga.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~ ↪

google-ima.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~ ↪

outbrain-widget.js /

~widgets.outbrain.com/outbrain.js~ ↪

hd-main.js ↪

~disqus_forums_embed.js AND disqus_embed.js~ /

~disqus.com/forums/*/embed.js~ ↪ AND ~disqus.com/embed.js~ ↪

Removed in 1.29.0.


Other

Deprecated by general purpose scriptlets / outdated (please move to proper section if still used).


golem.de.js ↪

Deprecated, addEventListener-defuser


chartbeat.js /

~static.chartbeat.com/chartbeat.js~ ↪

Deprecated, sets static properties (pSUPERFLY.activity, pSUPERFLY.virtualPage)

ligatus_angular-tag.js /

~ligatus.com/*/angular-tag.js~ ↪

Deprecated, sets static properties (adProtect, uabpdl, uabDetect)

addthis_widget.js /

~addthis.com/addthis_widget.js~ ↪

monkeybroker.js /

~d3pkae9owd2lcf.cloudfront.net/mb105.js~ ↪


Glossary

  • throw: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/throw
  • eval(): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval
  • setInterval() https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval
  • setTimeout() https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout)
  • regular expression: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Writing_a_regular_expression_pattern
  • element: https://developer.mozilla.org/en-US/docs/Web/HTML/Element
  • property: https://developer.mozilla.org/en-US/docs/Glossary/property/JavaScript
  • method: https://developer.mozilla.org/en-US/docs/Glossary/Method
  • CSS selector: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors