Closed qshannon closed 1 year ago
Adguard fix seems to be this one (so .. untranslatable in uBO for now), replacing / removing the ads from m3u8/mpd
! https://github.com/AdguardTeam/AdguardFilters/issues/129556
! https://github.com/AdguardTeam/AdguardFilters/issues/129658
! TODO: Try to find a way to fix an issue with time of the video
! At the moment, video player shows that time of the video is longer than it really is (time of the video + ads),
! so clicking somewhere after video end causes that the new video starts playing
cbs.com,paramountplus.com#%#(()=>{window.XMLHttpRequest.prototype.open=new Proxy(window.XMLHttpRequest.prototype.open,{apply:async(a,b,c)=>{const d=c[1];return"string"!=typeof d||0===d.length?Reflect.apply(a,b,c):(d.match(/pubads\.g\.doubleclick.net\/ondemand\/hls\/.*\.m3u8/)&&b.addEventListener("readystatechange",function(){if(4===b.readyState){const a=b.response;Object.defineProperty(b,"response",{writable:!0}),Object.defineProperty(b,"responseText",{writable:!0});const c=a.replaceAll(/#EXTINF:(\d|\d\.\d+)\,\nhttps:\/\/redirector\.googlevideo\.com\/videoplayback\?[\s\S]*?&source=dclk_video_ads&[\s\S]*?\n/g,"");b.response=c,b.responseText=c}}),Reflect.apply(a,b,c))}})})();
cbs.com,paramountplus.com#%#(()=>{const a=window.fetch;window.fetch=new Proxy(window.fetch,{apply:async(b,c,d)=>{const e=d[0];if("string"!=typeof e||0===e.length)return Reflect.apply(b,c,d);if(e.match(/pubads\.g\.doubleclick\.net\/ondemand\/.*\/content\/.*\/vid\/.*\/streams\/.*\/manifest\.mpd|pubads\.g\.doubleclick.net\/ondemand\/hls\/.*\.m3u8/)){const b=await a(...d);let c=await b.text();return c=c.replaceAll(/<Period id="(pre|mid|post)-roll-.-ad-[\s\S]*?>[\s\S]*?<\/Period>|#EXTINF:(\d|\d\.\d+)\,\nhttps:\/\/redirector\.googlevideo\.com\/videoplayback\?[\s\S]*?&source=dclk_video_ads&[\s\S]*?\n/g,""),new Response(c)}return Reflect.apply(b,c,d)}})})();
How to use the Adguard filters (for cbs/ paramountplus) in uBO:
https://raw.githubusercontent.com/mapx-/test/master/us.js
cbs.com,paramountplus.com##+js(cbs)
cbs.com,paramountplus.com##+js(cbs0)
Thanks to Adguard ( @AdamWr ) https://github.com/AdguardTeam/AdguardFilters/issues/129658
With the new xml-prune
scriptlet, this filter works:
cbs.com##+js(xml-prune, Period[id*="-roll-"][id*="-ad-"], , pubads.g.doubleclick.net/ondemand)
I tested only the URL in the opening comment.
I got directed here, but this is almost exactly the opposite of my problem: I don't get ads, but I also don't have my position in shows retained. Will test if the solution here still works for that, but that would be why I didn't actually consider this relevant.
EDIT: The Solution didn't. Do you just... put every problem with the same site under the same issue, even if the actual issues are wildly different? That seems odd, but I'm not in charge of the organization.
@Nezumi-chan Looks like the issue needs a subscribed account to reproduce? We cannot investigate without an account to test. Do you know any free links to reproduce?
I do not! Maybe someone else does? Sorry.
@Nezumi-chan If possible, can you test again at each of these steps (by opening new tab and load the website again)?
@@*$script,domain=paramountplus.com
@@*$xhr,domain=paramountplus.com
@@*$image,domain=paramountplus.com
@@*$frame,object,domain=paramountplus.com
@@*$ping,domain=paramountplus.com
Prerequisites
URL address of the web page
https://www.cbs.com/shows/video/BeUEVjgA5tu47nNfxxolVvIwFMi0YmBj/
Category
ads
Describe the issue
I have been watching shows frequently on CBS, and ads have always been blocked by uBlock until today. The ads now show instead of being blocked. To confirm: I have not made any adjustments to the plugin, other plugins, or any other changes to my viewing experience (browser, etc.).
Screenshot(s)
Screenshot(s)
![Screenshot 2022-09-15 210459](https://user-images.githubusercontent.com/58870561/190477873-1d97dd91-152a-4307-9cd0-2bc55172a269.jpg)Configuration