#!name= YouTube去广告
#!desc= YouTube去广告 (Premium 勿用且版本需 > 15.26.4)
#!icon= https://raw.githubusercontent.com/Tartarus2014/For-own-use/master/Color/YouTube.png

[Rewrite]
(^https?:\/\/[\w-]+\.googlevideo\.com\/(?!dclk_video_ads).+?)&ctier=L(&.+?),ctier,(.+) $1$2$3 header
^https?:\/\/[\w-]+\.googlevideo\.com\/(?!(dclk_video_ads|videoplayback\?)).+&oad - reject

^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v\d\/player\/ad_break - reject
^https?:\/\/(www|s)\.youtube\.com\/api\/stats\/ads - reject
^https?:\/\/(www|s)\.youtube\.com\/(pagead|ptracking) - reject
^https?:\/\/s\.youtube\.com\/api\/stats\/qoe\?adcontext - reject

[MITM]
hostname = -redirector*.googlevideo.com,*.googlevideo.com,www.youtube.com,s.youtube.com,youtubei.googleapis.com