mirror of
https://github.com/fmz200/wool_scripts.git
synced 2026-05-08 15:02:59 +08:00
add X网页版去广告
This commit is contained in:
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/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
|
||||||
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/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
|
||||||
@ -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;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
9
Surge/module/RedditTranslation.module
Normal file
9
Surge/module/RedditTranslation.module
Normal 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
|
||||||
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user