From 603631fd6935c41e7983bed991705a15fff34b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Wr=C3=B3blewski?= Date: Wed, 12 Feb 2025 12:50:46 +0100 Subject: [PATCH] Fix #198400 filstalwelle.de Fix #198374 filstalwelle.de --- GermanFilter/sections/general_extensions.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/GermanFilter/sections/general_extensions.txt b/GermanFilter/sections/general_extensions.txt index a89d1ee0e18..70a78fb980b 100644 --- a/GermanFilter/sections/general_extensions.txt +++ b/GermanFilter/sections/general_extensions.txt @@ -18,6 +18,23 @@ fitforfun.de,plus.rtl.de#%#//scriptlet('trusted-replace-xhr-response', 'true', ' fitforfun.de,brigitte.de#%#//scriptlet('trusted-replace-xhr-response', 'true', 'false', 'global_config.json') fitforfun.de,plus.rtl.de#%#//scriptlet('abort-on-stack-trace', 'Object.prototype.adReinsertion', 'createSdk') ! +! https://github.com/AdguardTeam/AdguardFilters/issues/198374 +! It looks like that PHPSESSID is checked on the server side +! I guess that it works like that - if specific PHPSESSID was registered and few/several seconds passed (I suppose 10 seconds or so) +! then it redirects to video content, otherwise it displays ads +! So, as a workaround a PHPSESSID is set to 1 for every video +! and it checks if the video content is available, if not, it tries again after 10 seconds, +! if it's available, it redirects to the video content +filstalwelle.de#$##mejsplayer:has(> video > source[src^="/video/content/a/"]) { display: none !important; } +filstalwelle.de#%#//scriptlet('trusted-replace-node-text', 'div', 'WERBUNG', 'WERBUNG', 'Trying to skip ads...') +!#if (adguard_app_windows || adguard_app_mac || adguard_app_android) +||filstalwelle.de/video/video$replace=/PHPSESSID=.*?'/PHPSESSID=1'/,document +filstalwelle.de#%#(()=>{if(!location.pathname.includes("/video/video"))return;const e=async t=>{const o=await fetch(t);(await o.text()).includes('src="content/')?location.replace(t):setTimeout(e,1e4,t)};window.addEventListener("load",(()=>{const t=document.querySelector("body > :is(.mejs__video, #mejsplayer) ~ script:not([type], [src])"),o=t?.textContent.match(/\$\('#bodyTarget'\)\.load\('(.+?)'.+?\);/)?.[1];if(o){let t=location.href.replace(/videoin\.php\?video=.*/,o);t=t.replace(/PHPSESSID=.*/,"PHPSESSID=1"),e(t)}else{console.debug("Required part not found in the script.")}}))})(); +!#endif +!#if (!adguard_app_windows && !adguard_app_mac && !adguard_app_android) +filstalwelle.de#%#//scriptlet("trusted-replace-node-text", "script", "doPostRoll", "/\?PHPSESSID=.*?'/", "?PHPSESSID=1'") +filstalwelle.de#%#//scriptlet("trusted-create-element", "head", "script", "", "(()=>{if(!location.pathname.includes('/video/video'))return;const e=async t=>{const o=await fetch(t);(await o.text()).match(/src=.content\//)?location.replace(t):setTimeout(e,1e4,t)};window.addEventListener('load',(()=>{const t=document.querySelector('body > :is(.mejs__video, #mejsplayer) ~ script:not([type], [src])'),o=t?.textContent.match(/\$\('#bodyTarget'\)\.load\('(.+?)'.+?\);/)?.[1];if(o){let t=location.href.replace(/videoin\.php\?video=.*/,o);t=t.replace(/PHPSESSID=.*/,'PHPSESSID=1'),e(t)}else{console.debug('Required part not found in the script.');}}))})();") +!#endif ! https://github.com/AdguardTeam/AdguardFilters/issues/190034 promiflash.de#%#//scriptlet('set-constant', 'adHandler.service', 'emptyObj') promiflash.de#%#//scriptlet('set-constant', 'adHandler.service.destroy', 'noopFunc')