mirror of
https://github.com/AdguardTeam/AdguardFilters.git
synced 2026-08-29 12:14:41 +00:00
Upd youtube.com
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
! Fix for new ads
|
||||
! TODO: move to the Base filter if it doesn't break anything
|
||||
||youtube.com^$replace=/"visitorData":".*?"\,//,document
|
||||
youtube.com#%#//scriptlet('trusted-replace-node-text', 'script', 'ytplayer', '/"visitorData":".*?",/', '')
|
||||
youtube.com#%#//scriptlet('set-constant', 'ytcfg.data_.INNERTUBE_CONTEXT.client.visitorData', 'undefined')
|
||||
youtube.com#%#(()=>{const e={apply:(e,t,o)=>{if(!(window.yt?.config_?.EXPERIMENT_FLAGS?.html5_enable_ssap_entity_id&&o[0]&&"X-Goog-Visitor-Id"===o[0]&&o[1]))return Reflect.apply(e,t,o)}};window.XMLHttpRequest.prototype.setRequestHeader=new Proxy(window.XMLHttpRequest.prototype.setRequestHeader,e)})();
|
||||
youtube.com#%#(()=>{const t={construct:(t,e,o)=>{if(window.yt?.config_?.EXPERIMENT_FLAGS?.html5_enable_ssap_entity_id){const t=e[0],o=e[1];if("https://www.youtube.com/"!==location.href&&t&&t.includes?.("/youtubei/"))try{delete o.headers["X-Goog-Visitor-Id"]}catch(t){console.trace(t)}if(o&&o.body?.includes("visitorData"))try{e[1].body=e[1].body.replace(/"visitorData":".*?",/,"")}catch(t){console.trace(t)}if(t&&t.includes?.("&sabr=1"))try{e[0]=e[0].replace("&sabr=1","")}catch(t){console.trace(t)}}return Reflect.construct(t,e,o)}};window.Request=new Proxy(window.Request,t)})();
|
||||
! remove anti-adb
|
||||
|
||||
Reference in New Issue
Block a user