Closed Sharkinator1198 closed 2 months ago
@gorhill Sorry, can uBO support redirecting to noop XML with the format of VMAP
and VAST
?
Currently, Adguard is supporting noopvmap-1.0
and noopvast-2/3/4.0
: https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-redirects.md#-available-redirect-resources
With this we don't need to allow and replace the ads connection
@@||pubads.g.doubleclick.net/gampad/ads?*www.worldsurfleague.com$xhr,domain=imasdk.googleapis.com
||pubads.g.doubleclick.net/gampad/ads?*www.worldsurfleague.com$xhr,domain=imasdk.googleapis.com,replace=/<vmap:VMAP.+//
I have to use replace because somehow xml-prune
and trusted-replace-xhr-response
don't work (it still logs successfully but it doesn't have effects like replace
: the ads connections still occur).
But I think redirection to noop VMAP / VAST resources is still better.
This link is better to test than OP's link: https://www.worldsurfleague.com/posts/503101/kelly-slater-lost-tapes-a-new-year?s1=watch
The filters needed to test is here: https://github.com/uBlockOrigin/uAssets/blob/bba7c73a7349296bf96cede7bd5c009078166f66/filters/unbreak.txt#L5729-L5734
noop-vmap1.0.xml
is already supported, see https://github.com/gorhill/uBlock/blob/master/src/web_accessible_resources/noop-vmap1.0.xml. I can add the others.
Confirm
||pubads.g.doubleclick.net/gampad/ads?*www.worldsurfleague.com$xhr,redirect=noop-vmap1.0.xml:5,domain=imasdk.googleapis.com
works for me.
uBlock Origin 1.59.1b18 + RU AdList
I found a problem in Firefox: https://fanserial.fun/748-kami-no-tou-2021-02-18-15-48/2-season/9-episode.html
When using ||v*.plrjs.org/*.xml$important,xmlhttprequest,redirect=noopvast-3.0
the player does not work, while in Google Chrome everything is fine. I had to add fanserial.fun,fanserialstv.net##+js(json-prune, *.preroll)
, but this fixes the problem only on a couple of sites, while I would like to apply a universal rule that will work correctly everywhere.
Probably because of https://github.com/uBlockOrigin/uBlock-issues/issues/1222?
Actually the player is not broken on my side in Firefox, but then the filter is not reported in the logger, and I don't get requests matching plrjs.org/*.xml
in the logger.
In order for the rule ||v*.plrjs.org/*.xml$important,xmlhttprequest,redirect=noopvast-3.0
to work and break the player, you need to add the exception fanserial.fun,fanserialstv.net#@#+js(json-prune, *.preroll)
.
Ok so I get:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at data:text/xml;base64,PFZBU1QgdmVyc2lvbj0iMy4wIj48L1ZBU1Q+Cg==. (Reason: CORS request not http).
So same issue as https://github.com/uBlockOrigin/uBlock-issues/issues/1222.
I can make it work with that filter:
fanserial.fun##+js(no-xhr-if, url:/v.*\.plrjs\.org\/.*\.xml/, war:noop-vast3.xml)
But can't make it a universal filter.
The thing is, I'm trying to avoid site-specific fixes. This is a pretty popular player and there could be hundreds of sites like this. The idea was to use a single rule everywhere: ||v*.plrjs.org/*.xml$important,xmlhttprequest,redirect=noopvast-3.0
This can't be fixed? In Google Chrome this rule works perfectly. Using this rule in AdGuard + FF also does not cause any problems.
Oops, I used the wrong link in comments, I meant same issue as https://github.com/uBlockOrigin/uBlock-issues/issues/1222. This can't be fixed (except by the browser, see https://bugzilla.mozilla.org/show_bug.cgi?id=1645683)
@dimisa-RUAdList Which filter did you use in Adguard?
The one they have in AdGuard RussianFilter: ||v*.plrjs.org/*.xml$xmlhttprequest,redirect=noopvast-3.0
If I'm not wrong, Adguard uses extension's ID (moz-extension://extension-id
) as the URL to access web-accessible-resources
, not data:
. That would lead to no CORS error, but will leak extension's ID to the websites. In Firefox, each extension ID after intalling is unique (same extension but different install will yield different IDs) so leaking this ID is a privacy concern.
You can test by using the filter
||example.com^$xhr,redirect=noopvast-3.0
then load https://example.com
, go to the console and type
fetch('https://example.com').then(response => console.log(response));
This is the result with Adguard:
This is the result with uBO:
Not a perfect solution but these might help in unknown cases?
!#if cap_html_filtering
@@||plrjs.org/*.xml^$3p,xhr
||plrjs.org/*.xml^$3p,xhr,replace=/^.+$/<VAST version="3.0"><\/VAST>/s
||cdn.plrjs.com/player/*.js^$3p,script,replace=/preroll/nopreroll/g
!#else
||plrjs.org/*.xml^$3p,xhr,redirect=noopvast-3.0
!#endif
It depends on the cache as well, so better to test when refreshing while bypassing the cache.
I can't put this in RU AdList because trusted rules only work from uBlock filters.
If they work fine, I'll put them to uAssets' lists
@gorhill Sorry, could there be any ways to have some non-trusted replace
versions that replace with the text in war
? Currently with my above replace
filter, I just simply remove all of the contents and replace with noopvast-3.0
@stephenhawk8054
If they work fine, I'll put them to uAssets' lists
Yes, it works fine, but for stable operation I will need to disable some rules for FF in RU AdList.
@dimisa-RUAdList I have edited to have a full version of network filters for both Firefox and Chromium. Can you check again? They should work with your current scriptlet filters in RuAdlist. The only concern is the important
since it will override the @@||plrjs.org/*.xml^$3p,xhr
On another note, I think non-trusted versions for replace
like my comment above might help for regional lists. We did talk briefly about a quite similar situation in https://github.com/uBlockOrigin/uAssets/issues/25164#issuecomment-2326647258 , but let's see how it turns out.
No problem. I will disable ||v*.plrjs.org/*.xml$important,xmlhttprequest,redirect=noopvast-3.0
for FF.
Oh, forgot that noopvast
is still in dev build, not in stable yet.
That's why I haven't deleted it yet: fanserial.fun,fanserialstv.net##+js(set-constant, Object.prototype.preroll, undefined)
could there be any ways to have some non-trusted
replace
versions that replace with the text inwar
?
Would need to experiment with this.
Prerequisites
URL address of the web page
https://www.worldsurfleague.com/posts/533717/its-on-finals-day-of-the-corona-fiji-pro
Category
breakage
Description
Video Player doesn't play when ublock is enabled
Other extensions used
none
Screenshot(s)
Screenshot(s)
Configuration