Some useful AdGuard and uBlock rules
Background Info
- Basic info about most commonly abused TLD's.
- For working with regex rules please use regex 101.
Why AdGuard filter list over EasyList filter lists
- AdGuard optimized filters are normally lighter on CPU and memory.
- AdGuard filters fight anti-adblock scripts where easy list filters fail and does cosmetic filtering better.
Here are some suggestions for specific needs
AdGuard Base filter with Easy List
https://filters.adtidy.org/extension/ublock/filters/2_optimized.txt
AdGuard Mobile Ads filter
https://filters.adtidy.org/extension/ublock/filters/11_optimized.txt
AdGuard Tracking Protection filter
https://filters.adtidy.org/extension/ublock/filters/3_optimized.txt
AdGuard Annoyances Filter
https://filters.adtidy.org/extension/ublock/filters/14_optimized.txt
ClearURLs
https://raw.githubusercontent.com/DandelionSprout/adfilt/master/ClearURLs%20for%20uBo/clear_urls_uboified.txt
AdGuard related Rules
! Block downloading executable content from insecure HTTP only websites
||http://*.exe^$redirect=nooptext
! Block all on much abused generic TLDs. TLD is between ||* and ^$, e.g. ||*.BID^$
||*.asia^
||*.asia^$csp=font-src 'self' 'unsafe-eval' http: https: data: blob: mediastream: filesystem:
||*.asia^$csp=script-src 'self' 'unsafe-eval' http: https: data: blob: mediastream: filesystem:
||*.asia^$document,popup
! Block all on much abused country code TLDs. TLD is between ||* and ^$, e.g. ||*.AM^$
||*.cn^
||*.cn^$csp=font-src 'self' 'unsafe-eval' http: https: data: blob: mediastream: filesystem:
||*.cn^$csp=script-src 'self' 'unsafe-eval' http: https: data: blob: mediastream: filesystem:
||*.cn^$document,popup
uBlock related Rules
! Block known video player iFrames
||cdn.podigee.com/podcast-player/$3p,frame,redirect=click2load.html
||dailymotion.com/embed/$3p,frame,redirect=click2load.html
||player.glomex.com/integration/$3p,frame,redirect=click2load.html
||player.vimeo.com/video/$3p,frame,redirect=click2load.html
||players.brightcove.net/$3p,frame,redirect=click2load.html
||scribd.com/embeds/$3p,frame,redirect=click2load.html
||youtube-nocookie.com/embed/$3p,frame,redirect=click2load.html
||youtube.com/embed/$3p,frame,redirect=click2load.html
Block Chess News on YN
! Block Chess related News on YN
news.ycombinator.com##a.titlelink:has-text(/\b(Carlsen|Chess|Nepo|Nepomniachtchi)\b/):style(background: #000;)
Block dangerous web-sockets and TLDs with uBlock
The list is alphabetically ordered based on above linked most dangerous domain websites.
SpamHaus TLDs are excluded because they are already blocked by almost every ISP by default.
/^(https?|wss?):\/\/([0-9a-z\-]+\.)?([0-9a-z\-]+\.)(accountant|bid|cf|club|cricket|date|download|faith|fun|ga|gdn|gq|loan|men|ml|online|ovh|party|pro|pw|racing|review|rocks|science|sh|site|space(?!(/socket\/websocket\?vsn\=))|stream|tk|top|trade|webcam|win|xyz|zone)(\.)?\/(.*)/$third-party,websocket,domain=~arium.events|~file.pizza|~instant.io|~kli.one|~mellivora.pro|~mellivora.trade|~myinterview.com|~polkadot.js.org|~proctoredu.com|~proctoredu.ru|~spaceship.media.mit.edu|~webtorrent.io|~yorbbackend.xyz|~redirect-ads.com
/^https?:\/\/([0-9a-z\.-_]+)\.(accountant|bid|cf|club|cricket|date|download|faith|fun|ga|gdn|gq|loan|men|ml|online|ovh|party|pro|pw|racing|review|rocks|science|sh|site|space|stream|tk|top|trade|webcam|win|xyz|zone)(\.)\/(.*)/$script,third-party
Dealing with CSP and JS - This can break websites
! Disable Content Security Policies set by filters on all websites by setting a CSP with no values
@@||*$csp
! Block the use of eval javascript command but allow using uBlocks no-eval scriptlet on all websites
*##+js(noeval)
! Block individual third-party requests such as images, media etc.
|HTTP://*$third-party,~stylesheet,~image,~media
! For only a specific website eg. example.com
! |HTTP://*$third-party,~stylesheet,~image,~media,domain=~example.com
Block all HTTP connections
|http:
Block Twitter Trending Section, which often spread misinformation or are irrelevant and inaccurate
twitter.com##+js(overlay-buster.js)
twitter.com##html:style(overflow: unset !important)
twitter.com##div#layers div[data-testid="sheetDialog"]:upward(div[role="group"][tabindex="0"])