Fix #198422 v.youku.com

This commit is contained in:
Adam Wróblewski
2025-02-13 12:42:50 +01:00
parent 8da48c9024
commit 4b3700701f

View File

@@ -107,6 +107,14 @@ msn.cn#%#//scriptlet('json-prune', 'configs.*.properties.slideshowWCSettings.int
||msn.cn/resolver/api/resolve/$jsonprune=\$.configs['SlideShow/ntpmsn'].properties.additionalChildExperiences..children..childExperienceConfigInfo.configRef[?(key-substr '\$' 'NativeAd')]
||assets.msn.cn/periconfigs/feature-configs/consumptionpage/gallery_default/config.json$jsonprune=\$.properties.componentConfigs.slideshowConfigs.interstitialNativeAds
||assets.msn.cn/periconfigs/feature-configs/consumptionpage/gallery_default/config.json$jsonprune=\$.properties.componentConfigs.slideshowConfigs.slideshowSettings.interstitialNativeAds
! https://github.com/AdguardTeam/AdguardFilters/issues/198422
! Rule below is required in case if DNS filtering is enabled.
! To play video website requires "cna" cookie (antiadblock/VPN message is displayed without this cookie)
! which is set by "https://log.mmstat.com/eg.js" script, but it's blocked on DNS level, so we need to set cookie manually.
! Original cookie value is the same as ETag value from "https://log.mmstat.com/eg.js" response, but it's not static.
! So as a workaround we use hardcoded value from "https://g.alicdn.com/kplayer/kuplayer/4.5.26-xmedia/index.js" script.
!+ PLATFORM(windows, mac, android)
v.youku.com#%#(()=>{const e="cna",t=()=>null!==document.cookie.match(new RegExp(`^${e}=|; ${e}=`));if(t())return;const o=new MutationObserver((()=>{const o=document.querySelector("preplay-layer > error-layer .preLayer-title");o&&o.textContent.includes("请关闭VPN代理软件或广告拦截插件后重试")&&!t()&&(document.cookie=`${e}=MwCHGEQKugYCAWoLKcbU0UGk;`,window.location.reload())})),n=document.documentElement;o.observe(n,{attributes:!0,childList:!0,subtree:!0}),setTimeout((()=>o.disconnect()),1e4)})();
! https://github.com/AdguardTeam/AdguardFilters/issues/34910
goodav17.com#%#//scriptlet("abort-on-property-read", "popunder")
! https://github.com/AdguardTeam/AdguardFilters/issues/132934