Improve adblock syntax (+security) and show invalid/unsupported filters
-
I love Vivaldi. But there is still potential for improvement with the adblocker (and security).
There are several filters that Vivaldi does not yet support. Therefore it would be great to get an overview of the valid/supported and invalid/unsupported filters of a filter list.
eg unsupported filters:
||url-xyz.com^$xhr
||url-xyz.com^$subdocument
||url-xyz.com^$ping
||url-xyz.com^$other
||url-xyz.com^$popup
||url-xyz.com^$third-party
||url-xyz.com^$script
||url-xyz.com^$generichide and genericblock
*##+js(no-floc) -> DOMBetter support also helps security. There are websites that want to steal local content and for that an adblocker would have to block access (or Vivaldi does it somehow).
List to block NAS access:
https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/lan-block.txtAdblock documentation:
https://help.eyeo.com/en/adblockplus/how-to-write-filters -
Ppafflick moved this topic from Vivaldi for Renault on
-
Update 2023-11
NOT supported yet (old list):
||url-xyz.com^$xhr ||url-xyz.com^$generichide
SUPPORTED yet:
||url-xyz.com^$subdocument ||url-xyz.com^$ping ||url-xyz.com^$other ||url-xyz.com^$popup ||url-xyz.com^$third-party ||url-xyz.com^$script ||url-xyz.com^$image ||url-xyz.com^$document ||url-xyz.com^$websocket ||url-xyz.com^$image,domain=xxx.com ||url-xyz.com/subpage/*$csp=script-src 'none' ||url-xyz.com/*.js$script,redirect=noopjs:100 *##+js(no-floc)
NEXT filter types could be:
||url-xyz.com^$badfilter ||url-xyz.com^$1p ||url-xyz.com^$3p ||url-xyz.com^$frame ||url-xyz.com^$header ||url-xyz.com^$important ||url-xyz.com^$inline-script ||url-xyz.com^$method ||example.com$_,removeparam=/^ss\\$/,_,image ||example.com$replace=/bad/good/,___,~third-party
I will try to check it regularly and add to it again if necessary. It would be great if Vivaldi could produce documentation. Perhaps the documentation already exists?
--
ModEdit: </>
-
@sdtbluethink said in Improve adblock syntax (+security) and show invalid/unsupported filters:
Perhaps the documentation already exists?
I don't think so. This thread is already a sort of documentation and would extremely useful if you manage to prefix which filters are:
- [ABP] format > most of them should be already supported
- [UBO] format > some of them might not be supported in the near time
- [OTR] format > only working with blockers different from [ABP] or [UBO]
Also, to me would be useful to see some feedback on when a blocking comes by internal blocker instead seeing a too much generic
ERR : Blocked by client
-
@sdtbluethink Maybe it's worth creating a feature request to support these expressions through the built-in adblock?
-
! Update (2024-04-12)
! NEW VALID
||url-xyz.com^$subdocument ||url-xyz.com^$xmlhttprequest ||url-xyz.com^$webrtc ||url-xyz.com^$document ||url-xyz.com^$media
! NOT SUPPORTED (Prio - prevent tracking)
||url-xyz.com$removeparam=/ref_/! NOT SUPPORTED (other)
||url-xyz.com^$method
||url-xyz.com^$header
||url-xyz.com^$badfilter
||url-xyz.com^$1p
||url-xyz.com^$first-party
||url-xyz.com^$xhr
||url-xyz.com^$frame
||url-xyz.com^$important! INVALID
||url-xyz.com^$genericblock
||url-xyz.com^$generichide
||url-xyz.com^$elemhideI couldn't test it on my smartphone.
--
ModEdit: </>
-
Update 2024-06
! NOT SUPPORTED - (2024-06)
||url-xyz.com^$method
||url-xyz.com^$header
||url-xyz.com^$badfilter
||url-xyz.com^$1p
||url-xyz.com^$first-party
||url-xyz.com^$xhr
||url-xyz.com^$frame
||url-xyz.com^$important
||url-xyz.com^$removeparam=utm_keyword
||url-xyz.com^$inline-script! INVALID - (2024-06)
||url-xyz.com^$genericblock
||url-xyz.com^$generichide
||url-xyz.com^$elemhide
||url-xyz.com^$ehide! SPECIAL LIKE - BLOCK SELECTED ELEMENTS FROM DOMAIN(S) - NOT SUPPORTED - (2024-06)
||^$popup,domain=url-xyz.com|url-abc.com
||^$script,domain=url-xyz.com|url-abc.com! SPECIAL LIKE - BLOCK EVERYTING FROM DOMAIN(S) - NOT SUPPORTED - (2024-06)
||.xx^
||.yyy^! SPECIAL - Block element that contains a text - NOT SUPPORTED - (2024-06)
url-xyz.com#?#.class_of_element:-abp-contains("search for text")
url-xyz.com#?#id_of_element:-abp-contains("search for text")
url-xyz.com#?#.class-xyz div:-abp-contains(searchfiltertext)
url-xyz.com#?#id-xyz div:-abp-contains(searchfiltertext)! SPECIAL - Block div that contains a text - NOT SUPPORTED - (2024-06)
url-xyz.com#?#.class_of_div_element div:-abp-contains("search for text")
url-xyz.com#?#id_of_div_element div:-abp-contains("search for text") -
! PREVIOUS VALID
||url-xyz.com^$domain=xxx.com|~yyy.com ||url-xyz.com^$csp=script-src 'none' *##+js(no-floc)
! NEW VALID (2024-08)
||url-xyz.com^$important ||url-xyz.com^$all ||url-xyz.com^$1p ||url-xyz.com^$first-party ||url-xyz.com^$genericblock ||url-xyz.com^$generichide ||url-xyz.com^$elemhide ||url-xyz.com^$ehide ||url-xyz.com/ad-script.js$redirect=noop.js ||url-xyz.com/ad-script.js$redirect-rule=noop.js ||.xx^ ||.yyy^
! NOT SUPPORTED - (2024-08)
! url-xyz.com#?#.feed-class:-abp-contains(/Sponsored|Promoted/)
! url-xyz.com#?#.feed-class:-abp-contains(Sponsored|Promoted)
! ||url-xyz.com^$method
! ||url-xyz.com^$header
! ||url-xyz.com^$badfilter
! ||url-xyz.com^$xhr
! ||url-xyz.com^$frame
! ||url-xyz.com^$removeparam=utm_keyword
!
! $3p,script,denyallow=url-xyz.com|url-abc.com,domain=aa.com|bb.com
Note: The above filter tells the network filtering engine when the context is aa.com or bb.com; it needs to block all 3rd-party scripts except those from url-xyz.com and url-abc.com. Note that the domain= option is required!! INVALID - (2024-08)
||url-xyz.com^$inline-script
! SPECIAL LIKE - BLOCK SELEC ELE FROM DOMAIN(S) - NOT SUPPORTED - (2024-06)
||^$popup,domain=url-xyz.com|url-abc.com
||^$script,domain=url-xyz.com|url-abc.com
! SPECIAL LIKE - BLOCK EVERYTING FROM DOMAIN(S) - NOT SUPPORTED - (2024-06)--
ModEdit: </>
-
Thank you for the validation of filter types.
I think it would be important and more practical for users if you could additionally indicate which uBO default filters (de facto standard) can be incorporated to the built-in adblocker.
-
@sdtbluethink Thank you for validation and information
-
! VALID/NEW - (2025-01) + 2025-04
*$popup,domain=url-xyz.com|url-abc.com *$script,domain=url-xyz.com|url-abc.com *$all,domain=url-xyz.com|url-abc.com
! VALID BUT NO FUNCTION - (2025-01)
url-xyz.com##+js(rmnt, script, /ANZEIGE/i) url-xyz.com##+js(set, CLI_Cookie, noopFn) url-xyz.com##^script:has-text(consentCookiePayload) url-xyz.com##[class*="nativeAd"]:upward(1) url-xyz.com##[id*="native-ad"]:upward(1) url-xyz.com##[id^="csi_"]:upward(li) url-xyz.com##.class-name:has-text(/Anzeige|Sponsored|Promoted/) url-xyz.com##div.class-name:has-text(/Anzeige|Sponsored|Promoted/) url-xyz.com##id-name:has-text(/Anzeige|Sponsored|Promoted/) url-xyz.com##div#id-name:has-text(/Anzeige|Sponsored|Promoted/)
! NOT SUPPORTED - (2025-01)
url-xyz.com##div#id_xyz.class_abc:has-text(ad-txt) url-xyz.com#?#.class-xyz div:-abp-contains("ad-txt") url-xyz.com#?#id-xyz:-abp-contains("ad-txt") url-xyz.com#?#*:has-text("ad-txt") url-xyz.com#?#.feed-class:-abp-contains(/Anzeige|Sponsored|Promoted/)
||url-xyz.com^$header=via:1.1 google ||url-xyz.com^$xhr ||url-xyz.com^$method=post|get ||url-xyz.com^$badfilter ||url-xyz.com^$removeparam=utm_keyword ||url-xyz.com^$frame ||url-xyz.com^$inline-script
*/.*/$permissions=run-ad-auction=(),document */.*/$permissions=private-state-token-issuance=(),document */.*/$permissions=private-state-token-redemption=(),document */.*/$permissions=run-ad-auction=(),document */.*/$permissions=join-ad-interest-group=(),document */.*/$permissions=browsing-topics=(),document
! SPECIAL NOT SUPPORTED - (2025-02)
$strict1p $strict3p *$strict3p,ipaddress=lan,domain=~localhost|~127.0.0.1|~[::1]|~0.0.0.0|~[::]|~local url-xyz.com##+js(set, window.open, function(){ return null; })
ModEdit: </>
-
My prediction is that in March we should see news of the improved adblocker, then we will see if the extended CSS will be incorporated, that will allow to use the lists that uBO and Adguard use:
-
Wow. That would be great. AdGuard's filters are a completely different matter (at least the lists I've looked at so far).
I'm also hoping for an ad picker and a protocol like uBlock (blocked/not blocked, etc.) -
-
Correction: The filters looked completely different to me back then.
Let's see. Back then I had in uBlock (many non-valid filters from AdGuard). But that was a while ago.
-
@barbudo2005 said in Improve adblock syntax (+security) and show invalid/unsupported filters:
My prediction is that in March we should see news of the improved adblocker, then we will see if the extended CSS will be incorporated, that will allow to use the lists that uBO and Adguard use:
I tried a little with it.
:upward(n) is great. Hope it will be available first. -
The package must be incorporated in its entirety, otherwise it makes no sense.
-
@barbudo2005
What do you mean? -
-
Now I understand.
I tried it with uBlock Origin, I should probably have written that. -
I use the
:upward
pseudo class in this regex filter in uBO:forum.vivaldi.net##ul.topic-list h2.title > a:has-text("/\b(media|store)|zoom)['‘’´]?s?\b/i"):upward(li)
It does not show the posts that contain the words in the list.
It works like a charm and can be used on any web page by changing the selectors.