Compare commits
6 Commits
3891fdb8c5
...
eb0f0d6886
| Author | SHA1 | Date | |
|---|---|---|---|
| eb0f0d6886 | |||
| 39061220f6 | |||
| 69061a2e99 | |||
| 1ac5c970f6 | |||
| 91f4896ca6 | |||
| 300f392c99 |
17
Loon/plugin/XWebAds.plugin
Normal file
17
Loon/plugin/XWebAds.plugin
Normal 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/Loon/plugin/XWebAds.plugin
|
||||
#!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
|
||||
16
QuantumultX/rewrite/XWebAds.snippet
Normal file
16
QuantumultX/rewrite/XWebAds.snippet
Normal 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/QuantumultX/rewrite/XWebAds.snippet
|
||||
#!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
|
||||
@ -57,6 +57,9 @@ try {
|
||||
entry.content.items = entry.content.items.filter((item) => {
|
||||
const itemContent = item.item?.itemContent || item.itemContent;
|
||||
const isItemAd = item.entryId?.includes("promoted") || itemContent?.promotedMetadata;
|
||||
if (isItemAd) {
|
||||
console.log(`❌TweetDetail去除广告条目2:${item.entryId}`);
|
||||
}
|
||||
return !isItemAd;
|
||||
});
|
||||
|
||||
|
||||
@ -7,16 +7,15 @@
|
||||
#!raw-url=https://github.com/fmz200/wool_scripts/raw/main/Surge/module/XWebAds.module
|
||||
#!tg-channel=https://t.me/inaisi
|
||||
#!tag=去广告, X, 奶思
|
||||
#!system=ios
|
||||
#!date=2026-04-26 09:30:00
|
||||
|
||||
|
||||
[Body Rewrite]
|
||||
# [Body Rewrite]
|
||||
# 首页信息流中的推广
|
||||
# http-response-jq ^https?:\/\/x\.com\/i\/api\/graphql\/[^\/]+\/HomeTimeline '.data.home.home_timeline_urt.instructions[]?.entries |= map(select(.content.itemContent.promotedMetadata == null and (.entryId | startswith("promoted-tweet-") | not)))'
|
||||
|
||||
[Script]
|
||||
X网页版去广告 = type=http-response,pattern=^https?:\/\/x\.com\/i\/api\/graphql\/[^\/]+\/(HomeTimeline|TweetDetail),requires-body=1,max-size=0,binary-body-mode=0,script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/X/X_ads.js
|
||||
X网页版去广告 = type=http-response, pattern=^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
|
||||
|
||||
[MITM]
|
||||
hostname = %APPEND% x.com
|
||||
Reference in New Issue
Block a user