Skip to content

Commit

Permalink
Update YoutubeAds
Browse files Browse the repository at this point in the history
  • Loading branch information
FYLSen committed Feb 18, 2024
1 parent 840cfed commit ea5ebb9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
21 changes: 6 additions & 15 deletions Modules/YoutubeAds.sgmodule
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
#!name=Youtube (Music) Enhance
#!desc=适用于 Youtube & Youtube Music (IOS >= 15)

# > Feature
# - 删除 Youtube (Music) 广告
# - 删除 Youtube 底部 上传 按钮 & Youtube Music 底部选段、升级按钮
# + 增加 Youtube 画中画(PIP)
# + 增加 Youtube 字幕翻译 (Thanks @VirgilClyne)
# + 增加 Youtube (Music) 后台播放
# + 增加 Youtube Music 歌词翻译
#!arguments=屏蔽上传按钮:true,屏蔽选段按钮:true,字幕翻译语言:zh-Hans,歌词翻译语言:zh-Hans
#!arguments-desc=- 屏蔽参数:[true, false] \n- 翻译参数:[语言代码, off]\n\n# 语言代码遵循 Google Translate Languages Codes, 当填入 off 时关闭翻译

# > Note
# Youtube 画中画和后台播放分别在客户端内关闭
# - 设置 -> 通用 -> 画中画
# - 设置 -> 后台播放和下载 -> 后台播放
# 该模块已足够全面,无需其他规则混用,防止重写规则被破坏
# 不支持 Mock 的客户端可以用 reject-200/reject-img 替代

# > Credit
# @Choler & @DivineEngine & @app2smile

[Rule]
AND,((DOMAIN-SUFFIX,googlevideo.com), (PROTOCOL,UDP)),REJECT-NO-DROP
AND,((DOMAIN-SUFFIX,googlevideo.com), (PROTOCOL,UDP)),REJECT
AND,((DOMAIN,youtubei.googleapis.com), (PROTOCOL,UDP)),REJECT

[Script]
youtube.request = type=http-request,pattern=^https:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/(browse|next|player|reel\/reel_watch_sequence),requires-body=1,max-size=-1,binary-body-mode=1,script-path=https://fleet.fylsen.com/Script/youtube.request.beta.js
youtube.response = type=http-response,pattern=^https:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/(browse|next|player|search|reel\/reel_watch_sequence|guide|account\/get_setting),requires-body=1,max-size=-1,binary-body-mode=1,script-path=https://fleet.fylsen.com/Script/youtube.response.beta.js
youtube.request = type=http-request,pattern=^https:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/(browse|next|player|reel\/reel_watch_sequence),requires-body=1,max-size=-1,binary-body-mode=1,script-path=https://fleet.fylsen.com/Script/youtube.request.preview.js
youtube.response = type=http-response,pattern=^https:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/(browse|next|player|search|reel\/reel_watch_sequence|guide|account\/get_setting),requires-body=1,max-size=-1,binary-body-mode=1,script-path=https://fleet.fylsen.com/Script/youtube.response.preview.js,argument="{"lyricLang":"{{{歌词翻译语言}}}","captionLang":"{{{字幕翻译语言}}}","blockUpload":{{{屏蔽上传按钮}}},"immersive":{{{屏蔽选段按钮}}}}"

[URL Rewrite]
(^https?:\/\/[\w-]+\.googlevideo\.com\/(?!dclk_video_ads).+?)&ctier=L(&.+?),ctier,(.+) url 302
Expand Down
Loading

0 comments on commit ea5ebb9

Please sign in to comment.