add X网页版去广告

This commit is contained in:
奶思(⸝⸝•‧̫•⸝⸝)
2026-04-27 12:21:10 +08:00
committed by 我的奶思
parent b25e37300f
commit 300f392c99
5 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,17 @@
#!name=X(Twitter)网页版去广告
#!desc=移除网页版 X (Twitter) 广告。
#!author=奶思[https://github.com/fmz200]
#!icon=https://raw.githubusercontent.com/fmz200/wool_scripts/main/icons/apps/X.png
#!tag=奶思的模块
#!homepage=https://github.com/fmz200/wool_scripts
#!raw-url=https://github.com/fmz200/wool_scripts/raw/main/Surge/module/XWebAds.module
#!tg-channel=https://t.me/inaisi
#!tag=去广告, X, 奶思
#!system=iOS, iPadOS
#!date=2026-04-26 09:30:00
[Script]
http-response ^https?:\/\/x\.com\/i\/api\/graphql\/[^\/]+\/(HomeTimeline|TweetDetail) script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/X/X_ads.js, requires-body=true, tag=X网页版去广告
[MITM]
hostname = x.com

View File

@ -0,0 +1,16 @@
#!name=X(Twitter)网页版去广告
#!desc=移除网页版 X (Twitter) 广告。
#!author=奶思[https://github.com/fmz200]
#!icon=https://raw.githubusercontent.com/fmz200/wool_scripts/main/icons/apps/X.png
#!tag=奶思的模块
#!homepage=https://github.com/fmz200/wool_scripts
#!raw-url=https://github.com/fmz200/wool_scripts/raw/main/Surge/module/XWebAds.module
#!tg-channel=https://t.me/inaisi
#!tag=去广告, X, 奶思
#!system=iOS, iPadOS
#!date=2026-04-26 09:30:00
^https?:\/\/x\.com\/i\/api\/graphql\/[^\/]+\/(HomeTimeline|TweetDetail) url script-response-body https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/X/X_ads.js
hostname = x.com

View File

@ -57,6 +57,9 @@ try {
entry.content.items = entry.content.items.filter((item) => { entry.content.items = entry.content.items.filter((item) => {
const itemContent = item.item?.itemContent || item.itemContent; const itemContent = item.item?.itemContent || item.itemContent;
const isItemAd = item.entryId?.includes("promoted") || itemContent?.promotedMetadata; const isItemAd = item.entryId?.includes("promoted") || itemContent?.promotedMetadata;
if (isItemAd) {
console.log(`❌TweetDetail去除广告条目2${item.entryId}`);
}
return !isItemAd; return !isItemAd;
}); });

View File

@ -0,0 +1,9 @@
#!name=Reddit 自动翻译
#!desc=自动注入 x-reddit-translations 开启 Reddit App 翻译功能
#!author=RavelloH
[Script]
Reddit自动翻译 = type=http-request, pattern=^https?:\/\/gql(-fed)?\.reddit\.com, script-path=https://gist.github.com/RavelloH/68ed0626dae69a1ce7c8ad6887087ea1/raw/c008127260bc4dcd550fcd98285048cf6176f602/main.js
[MITM]
hostname = %APPEND% gql.reddit.com, gql-fed.reddit.com

View File

@ -7,7 +7,7 @@
#!raw-url=https://github.com/fmz200/wool_scripts/raw/main/Surge/module/XWebAds.module #!raw-url=https://github.com/fmz200/wool_scripts/raw/main/Surge/module/XWebAds.module
#!tg-channel=https://t.me/inaisi #!tg-channel=https://t.me/inaisi
#!tag=去广告, X, 奶思 #!tag=去广告, X, 奶思
#!system=ios #!system=iOS, iPadOS
#!date=2026-04-26 09:30:00 #!date=2026-04-26 09:30:00