-
Notifications
You must be signed in to change notification settings - Fork 8
Home
-
Writing Adblock Plus filters:
https://adblockplus.org/en/filters
Describes older syntax, but all things are still actual for uBlock Origin. -
The same manual, extended version:
https://help.eyeo.com/en/adblockplus/how-to-write-filters -
uBlock Origin manual:
https://github.com/gorhill/uBlock/wiki/Procedural-cosmetic-filters
https://github.com/gorhill/uBlock/wiki/Static-filter-syntax
https://github.com/gorhill/uBlock/wiki/Inline-script-tag-filtering -
List of uBlock Origin scriptlets:
https://github.com/gorhill/uBlock/wiki/Resources-Library -
Yet another manual:
https://github.com/DandelionSprout/adfilt/blob/master/Wiki/SyntaxMeaningsThatAreActuallyHumanReadable.md -
Russian version:
https://adguard.com/kb/ru/general/ad-filtering/create-own-filters/ -
Syntax quirks:
https://github.com/gorhill/uBlock/wiki/Syntax-quirks
https://github.com/uBlockOrigin/uBlock-issues/wiki/Filter-performance
Examples:
All elements after ##.wrapper-content-main > h2 (but not text):
##.wrapper-content-main > h2 ~ *
##.wrapper-content-main > h2 + *
Shadow root issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/803
Matches-css with regexps (from gorhill wiki):
facet.wp.pl##div[class^="_"]:matches-css(background-image: /^url("data:image/png;base64,/)
https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#permissions
||example.com$replace=/bad/good/
Some xpath good examples (for :xpath(arg)):
https://devhints.io/xpath