├── .gitignore ├── rawgithub ├── cf.jpg ├── raw.js └── readme.md ├── readme.md ├── betterweb ├── jianshu.conf ├── baiduPan.conf ├── v2ex.js ├── stackoverflow.snippet ├── smzdm.conf ├── readme.md ├── csdn.conf ├── zhihu.conf ├── jianshu.js ├── csdn.req.js ├── baiduPan.js ├── stackoverflow.js ├── csdn.res.js ├── smzdm.res.js ├── zhihux.user.js └── baidu.user.js ├── nodeToSub ├── getShow.js ├── nodeToSub.js └── Readme.md ├── justopenit └── justopenit.conf ├── shortcuts └── readme.md ├── google ├── google_noredirect.js ├── rewriteG.conf ├── simplifyurl.js └── Endless_Google.user.js ├── tgbotmessage.js ├── tamperJSLog.js └── cookieshow.js /.gitignore: -------------------------------------------------------------------------------- 1 | .git -------------------------------------------------------------------------------- /rawgithub/cf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/HEAD/rawgithub/cf.jpg -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ## 一些自制的 QUANX 小工具 2 | 3 | 更新频道: https://t.me/elecV2 4 | 5 | *其他软件理论上也能用(没测试,不保证)* 6 | 7 | - 手机网页显示优化系列 [betterweb](https://github.com/elecV2/QuantumultX-Tools/tree/master/betterweb) 8 | - 捷径系列 [shortcuts](https://github.com/elecV2/QuantumultX-Tools/tree/master/shortcuts) -------------------------------------------------------------------------------- /rawgithub/raw.js: -------------------------------------------------------------------------------- 1 | // 复制本文件代码到 cloudflare worker,搭建自己的加速服务器 2 | 3 | addEventListener( 4 | "fetch",event => { 5 | let url=new URL(event.request.url); 6 | url.hostname="raw.githubusercontent.com"; 7 | let request=new Request(url,event.request); 8 | event.respondWith( 9 | fetch(request) 10 | ) 11 | } 12 | ) -------------------------------------------------------------------------------- /rawgithub/readme.md: -------------------------------------------------------------------------------- 1 | CDN 加速直连 raw.githubusercontent.com 2 | 3 | ``` 4 | [rewrite] 5 | ^https://raw.githubusercontent.com url 307 https://raw.ev2.workers.dev 6 | 7 | [mitm] 8 | raw.githubusercontent.com 9 | ``` 10 | 11 | 说明: 12 | 13 | - CDN 服务器使用的是CF workers,每日请求限额10万次 14 | - 请勿使用302/307 重定向到一个你不信任的网址,建议自己搭一个,免费且更安全 15 | 16 |  -------------------------------------------------------------------------------- /betterweb/jianshu.conf: -------------------------------------------------------------------------------- 1 | // 规则仅对手机网页版有效,如使用APP 请勿添加 2 | // 更新频道:https://t.me/elecV2 3 | 4 | hostname = www.jianshu.com 5 | 6 | // 先重写到桌面版 7 | ^https:\/\/www\.jianshu\.com\/p url request-header (\r\n)User-Agent:.+(\r\n) request-header $1User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36$2 8 | 9 | // 再注入 CSS 进行优化 10 | ^https:\/\/www\.jianshu\.com\/p url script-response-body https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/jianshu.js -------------------------------------------------------------------------------- /nodeToSub/getShow.js: -------------------------------------------------------------------------------- 1 | /* 2 | ** 功能:将链接 GET 变量 bstr 中的字符直接输出 3 | ** 使用:将代码直接拷贝到 cloudflare workers 即可 4 | *** 5 | ** 注意:GET传递字符量有限(2000~左右) 6 | */ 7 | 8 | async function handleRequest(data) { 9 | const init = { 10 | headers: { 11 | 'content-type': 'text/plain;charset=UTF-8', 12 | }, 13 | } 14 | return new Response(data, init) 15 | } 16 | 17 | addEventListener('fetch', event => { 18 | let url = new URL(event.request.url) 19 | let info = url.searchParams.get('bstr') 20 | let bstr = info ? info : 'author: elecV2\n\ngithub: https://github.com/elecV2' 21 | return event.respondWith(handleRequest(bstr)) 22 | }) -------------------------------------------------------------------------------- /betterweb/baiduPan.conf: -------------------------------------------------------------------------------- 1 | // 百度网盘手机网页优化。 (APP 用户请勿添加) 2 | // 可直接下载视频/音频/zip 等文件 3 | // 更新频道:https://t.me/elecV2 4 | // QuantumultX rewrite 订阅地址: https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/baiduPan.conf 5 | 6 | hostname = pan.baidu.com 7 | 8 | // 先重写到桌面版 9 | ^https:\/\/pan\.baidu\.com url request-header (\r\n)User-Agent:.+(\r\n) request-header $1User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36$2 10 | 11 | // 再注入 CSS 进行优化 12 | ^https:\/\/pan\.baidu\.com url script-response-body https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/baiduPan.js -------------------------------------------------------------------------------- /justopenit/justopenit.conf: -------------------------------------------------------------------------------- 1 | hostname = link.csdn.net, link.jianshu.com, link.zhihu.com, redirect.ruguoapp.com, www.google.com 2 | 3 | // [rewrite_local] 4 | // 移除简书跳转第三方网站的中间提醒 5 | ^https://link\.jianshu\.com/\?t=(.*) url 307 $1 6 | 7 | // 移除CSDN跳转第三方网站的中间提醒 8 | ^https?://link\.csdn\.net/api/v1/link/check\?url=(.*) url 302 $1 9 | 10 | // 移除即刻跳转第三方网站的中间提醒(好像无效) 11 | // ^https://redirect\.ruguoapp\.com/\?redirect=(https?)%3A%2F%2F(.*) url 307 $1://$2 12 | 13 | // 移除知乎跳转第三方网站的中间提醒 14 | ^https?://link\.zhihu\.com/\?target=(https?)%3A//(.*) url 307 $1://$2 15 | 16 | // 移除 Google 搜索结果中的重定向 17 | ^https://www\.google\.com/url.+url=(https?)%3A%2F%2F([^%]+)%2F([^&]+) url 307 $1://$2/$3 18 | -------------------------------------------------------------------------------- /betterweb/v2ex.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 名称:v2ex.js 3 | * 4 | ******** (已修改) 以下为 tamperJS 自动生成的 rewrite 相关信息,可能需要根据情况适当调整 ******** 5 | 6 | [rewrite] 7 | ^https://v2ex\.com/(t|\?tab) url script-response-body v2ex.js 8 | 9 | [mitm] 10 | v2ex.com 11 | 12 | ******** 13 | * 工具: tamperJS BY @elecV2 14 | * 频道: https://t.me/elecV2 15 | **/ 16 | 17 | let body = $response.body 18 | 19 | if (/<\/head>/.test(body)) { 20 | body = body.replace('', ``) 28 | 29 | // console.log('添加 tamperJS:v2ex.js') 30 | } 31 | 32 | $done({ body }) -------------------------------------------------------------------------------- /shortcuts/readme.md: -------------------------------------------------------------------------------- 1 | # 一些捷径 2 | 3 | 适用于 iOS Shortcuts 4 | 更新频道: https://t.me/elecV2 5 | 6 | ## JS 直链下载 - 自定义JS直链下载列表,可选择下载全部(默认)或挑选部分进行下载 7 | 8 | 链接: https://www.icloud.com/shortcuts/50d7d8576dd74f7685811502ff72c078 9 | 10 | 说明: 11 | 12 | - 下载文件保存在 iCoud Drive/shortcuts/elecV2JS文件夹(每次运行都会清空旧的文件) 13 | - 下载完成后,需手动复制一下文件到相关软件的对应目录 14 | - 理论上可以下载任何文本文件(.conf/.list/.md等) 15 | 16 | ## tamperJS - 配合 MITM 软件,在任意网页中使用 tampermonkey 脚本 17 | 18 | *iOS15 后 safari 浏览器已实现原生支持,此捷径没有再使用的必要* 19 | 20 | 链接: https://www.icloud.com/shortcuts/7a21b797d6c34a59a3978683dabc6298 21 | 22 | ## 京东 23 | 24 | - 京东活动列表 https://www.icloud.com/shortcuts/31878ea1e268423ca9bd8d46a1bf26d1 25 | - 通过京东 APP 打开某个链接: https://www.icloud.com/shortcuts/0cc89f3de2e349eb993d7f28a21603e6 -------------------------------------------------------------------------------- /betterweb/stackoverflow.snippet: -------------------------------------------------------------------------------- 1 | // stackoverflow 网页显示优化 2 | // 更新频道: https://t.me/elecV2 3 | // QuanX 重写订阅地址:https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/stackoverflow.snippet 4 | 5 | hostname = stackoverflow.com, *.stackexchange.com, superuser.com, serverfault.com 6 | 7 | // 本地测试 8 | // ^https://stackoverflow|superuser\.com/question url script-response-body stackoverflow.js 9 | 10 | // 注入 CSS 进行优化 11 | ^https://stackoverflow|superuser|serverfault\.com/question url script-response-body https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/stackoverflow.js 12 | 13 | ^https://.+\.stackexchange\.com/question url script-response-body https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/stackoverflow.js -------------------------------------------------------------------------------- /betterweb/smzdm.conf: -------------------------------------------------------------------------------- 1 | // SMZDM 手机网页显示优化 2 | // 规则仅对手机网页版有效,如使用APP 请勿添加 3 | // QuantumultX rewrite 订阅地址: https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/smzdm.conf 4 | 5 | hostname = post.smzdm.com, post.m.smzdm.com 6 | 7 | // post.m.smzdm.com 重定向及更改到桌面版 User-Agent 8 | ^https:\/\/post\.m\.smzdm\.com url 307 https://post.smzdm.com 9 | ^https:\/\/post\.smzdm\.com\/ url request-header (\r\n)User-Agent:.+(\r\n) request-header $1User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36$2 10 | 11 | // 再注入 CSS 进行优化 12 | ^https:\/\/post\.smzdm\.com\/ url script-response-body https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/smzdm.res.js 13 | 14 | // 更新频道: https://t.me/elecV2 -------------------------------------------------------------------------------- /betterweb/readme.md: -------------------------------------------------------------------------------- 1 | ### 网页显示优化 2 | 3 | 该系列脚本主要用于优化一些网页在手机浏览器上面的显示,及免(屏蔽)跳转 APP或应用商店,如正在使用相关应用的 APP 请勿添加。 4 | (只用 QuantumultX 进行了测试,其他软件理论上也可以使用,不过格式可能需要调整一下) 5 | 6 | 更新频道: https://t.me/elecV2 7 | 8 | 目前包含: 9 | 10 | - 知乎网页优化 QuanX rewrite 订阅: https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/zhihu.conf 11 | - 百度网盘页面优化 订阅: https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/baiduPan.conf 12 | - CSDN 博客优化 订阅: https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/csdn.conf 13 | - SMZDM 网页显示优化: https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/smzdm.conf 14 | - stackoveflow 网页显示优化: https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/stackoverflow.snippet 15 | 16 | - 谷歌移除搜索结果的重定向(*这个放在其他文件夹*) 订阅: https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/google/rewriteG.conf -------------------------------------------------------------------------------- /google/google_noredirect.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 用于去除谷歌搜索结果的重定向 3 | * 更新频道:https://t.me/elecV2 4 | * 5 | * QuanX 重写订阅:https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/google/rewriteG.conf 6 | * 7 | * 或者手动添加: 8 | * [rewrite] 9 | * ^https://www\.google\.com/url\? url script-echo-response https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/google/google_noredirect.js 10 | * 11 | * [mitm host] 12 | * www.google.com 13 | **/ 14 | 15 | if (typeof $request !== 'undefined') { 16 | const urlorg = $request.url 17 | let urlnew = urlorg.match(/url=([^&]+)/) 18 | if (urlnew) { 19 | // console.log(JSON.stringify(urlnew)) 20 | $done({ 21 | status: 'HTTP/1.1 307 Temporary Redirect', 22 | headers: { "Location": decodeURIComponent(urlnew[1]) } 23 | }) 24 | } else { 25 | $done({}) 26 | } 27 | } else { 28 | console.log('脚本用于重写(rewrite) 网络请求,请勿直接运行该脚本\n问题反馈: https://t.me/elecV2') 29 | typeof $done !== 'undefined' && $done() 30 | } -------------------------------------------------------------------------------- /betterweb/csdn.conf: -------------------------------------------------------------------------------- 1 | // CSDN 手机网页显示优化 2 | // 规则仅对手机网页版有效,如使用APP 请勿添加 3 | // QuantumultX rewrite 订阅地址: https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/csdn.conf 4 | 5 | hostname = blog.csdn.net, *.openinstall.io 6 | 7 | // 拦截CSDN登入提示(可能,来源网友提供 8 | ^https:\/\/blog\.csdn\.net\/sw\.js$ url reject 9 | 10 | // 先重写到桌面版 11 | ^https:\/\/blog\.csdn\.net\/ url request-header (\r\n)User-Agent:.+(\r\n) request-header $1User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36$2 12 | 13 | // 再注入 CSS 进行优化 14 | ^https:\/\/blog\.csdn\.net\/.*\/article\/details url script-response-body https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/csdn.res.js 15 | 16 | // 免跳转应用商店(也可以直接 filter 屏蔽 openinstall.io) *重写到桌面版后,这条规则基本就没什么用了* 17 | ^https:\/\/wvhzpj\.openinstall\.io\/ulink url script-echo-response https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/csdn.req.js 18 | 19 | // 更新频道: https://t.me/elecV2 -------------------------------------------------------------------------------- /google/rewriteG.conf: -------------------------------------------------------------------------------- 1 | // google 相关重写(部分已失效 2 | // 作者:TG @elecV2 3 | // 订阅链接: https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/google/rewriteG.conf 4 | 5 | hostname = www.google.com, www.google.cn, www.g.cn 6 | 7 | // google.cn 重定向 8 | ^https?:\/\/(www.)?(g|google)\.cn url 307 https://www.google.com 9 | 10 | // 屏蔽一些 ping 请求 11 | // https://www\.google\.com/client_204 url reject-200 12 | // https://www\.google\.com/ads url reject-dict 13 | 14 | // 去除 url 中的其他参数(在自动加载下一页是有问题,手机用户请勿添加 15 | // https://www\.google\.com/(m|search)\? url script-request-header https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/google/simplifyurl.js 16 | 17 | // google 去除搜索结果重定向 no redirect 18 | // ^https://www\.google\.com/url.+url=(https?)%3A%2F%2F([^%]+)%2F([^&]+) 19 | ^https://www\.google\.com/url\? url script-echo-response https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/google/google_noredirect.js 20 | 21 | // 自动翻页(Google 新版已自动加载,故注释掉。如有需要,自行开启 22 | // https:\/\/www\.google\.com\/(m|search) url script-response-body https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/google/Endless_Google.user.js -------------------------------------------------------------------------------- /betterweb/zhihu.conf: -------------------------------------------------------------------------------- 1 | // 知乎手机网页优化。(如使用 APP 请勿添加本规则) 2 | // 更新频道: https://t.me/elecV2 3 | // QuanX 重写订阅地址:https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/zhihu.conf 4 | 5 | hostname = oia.zhihu.com, link.zhihu.com, www.zhihu.com 6 | 7 | // 先重写到桌面版 8 | ^https:\/\/www\.zhihu\.com\/(question|topic) url request-header (\r\n)User-Agent:.+(\r\n) request-header $1User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36$2 9 | 10 | // 再注入 CSS 进行优化 11 | ^https:\/\/www\.zhihu\.com\/question url script-response-body https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/zhihux.user.js 12 | ^https:\/\/www\.zhihu\.com\/topic url script-response-body https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/zhihux.user.js 13 | 14 | // 去掉知乎跳转第三方网站的中间页面 15 | ^https?:\/\/link\.zhihu\.com/\?target=(https?)%3A//(.*) url 307 $1://$2 16 | 17 | // 不跳转应用商店 18 | ^https:\/\/oia\.zhihu\.com\/answers\/([0-9]+)\?.* url 307 https://www.zhihu.com/answer/$1 19 | ^https:\/\/oia\.zhihu\.com\/articles\/([0-9]+)\?.* url 307 https://zhuanlan.zhihu.com/p/$1 -------------------------------------------------------------------------------- /google/simplifyurl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * simplifyurl - 移除 Google 搜索 url 中多余的参数 3 | * 说明:在自动加载下一页时有问题,待修复 4 | **************** 5 | 6 | [rewrite] 7 | // 以下两种方式任选其一 8 | https://www\.google\.com/(m|search)\? url script-request-header https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/google/simplifyurl.js 9 | 10 | // 307 重定向,无需 JS。缺点是不能翻页、无法查看图片/视频等其他搜索项 11 | // https:\/\/www\.google\.com\/(m|search).+(q=[^&]+)&.+ url 307 $1?$2 12 | 13 | [mitm] 14 | hostname = www.google.com 15 | 16 | ******** 17 | * 作者: TG@elecV2 18 | **/ 19 | 20 | if (typeof $request === 'undefined') { 21 | console.log('脚本用于重写(rewrite) 网络请求,请勿直接运行该脚本\n问题反馈: https://t.me/elecV2') 22 | typeof $done !== 'undefined' && $done() 23 | } 24 | 25 | const url = $request.url 26 | if (!url.match(/\?/)) { 27 | $done({}) 28 | } 29 | 30 | const qs = { 31 | google: ['q', 'location', 'uule', 'hl', 'nfpr', 'filter', 'tbm', 'tbs', 'start', 'num', 'lr', 'ijn', 'nirf', 'safe'] 32 | } 33 | 34 | let urlb = new URL(url); 35 | 36 | const skey = []; 37 | qs.google.forEach(key=>{ 38 | const v = urlb.searchParams.get(key); 39 | if (v) { 40 | skey.push(`${key}=${v}`); 41 | } 42 | }); 43 | if ([...urlb.searchParams].length !== skey.length) { 44 | const path = urlb.pathname + '?' + encodeURI(skey.join('&')); 45 | console.log(`${url} redirectPath to ${path}`); 46 | $done({ path }); 47 | } else { 48 | $done({}); 49 | } -------------------------------------------------------------------------------- /tgbotmessage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 功能:使用TG bot 给频道或他人发信息 3 | * 使用方法: 4 | * 先使用 https://t.me/BotFather 创建一个机器人,获取 bot token 5 | * 然后获取目标用户的 chatid,填写到下面对应位置。然后start bot 6 | * 7 | * 如果要发送到频道,先将机器人拉到频道并给予管理员权限 8 | * 9 | * cron 8 8 8 * * * tgbotmessage.js 10 | * 11 | */ 12 | 13 | 14 | const CONFIG = { 15 | chatid: '8xxxxxxxxxxxxx', // 接受信息的用户 id 16 | token: 'xxxxxxxxxxxxxxxxxx' // tg bot token 17 | } 18 | 19 | let message = `[必应随机壁纸](https://bing.ioliu.cn/v1/rand?${Date.now()})` // api 来源: https://github.com/xCss/bing 20 | 21 | const payload = { 22 | "method": "sendMessage", 23 | "chat_id": CONFIG.chatid, 24 | "parse_mode": "markdown", 25 | "disable_web_page_preview": false, 26 | "text": 'hello elecV2!' 27 | } 28 | 29 | payload.text = message 30 | 31 | const myRequest = { 32 | url: `https://api.telegram.org/bot${CONFIG.token}/`, 33 | method: 'POST', 34 | headers: { 35 | 'Content-Type': 'application/json' 36 | }, 37 | body: JSON.stringify(payload) 38 | } 39 | 40 | $task.fetch(myRequest).then(res => { 41 | try { 42 | let body = JSON.parse(res.body) 43 | if (body.ok) { 44 | let result = body.result 45 | console.log('send', result.chat.username, result.chat.first_name, result.chat.last_name, 'message:', result.text) 46 | } else { 47 | console.log(body) 48 | } 49 | } catch { 50 | console.log(res.body) 51 | } 52 | }, error => { 53 | console.log(error) 54 | }) -------------------------------------------------------------------------------- /betterweb/jianshu.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 名称:jianshu.js 3 | * 作者:elecV2 4 | * 5 | ******** Quantumult X conf ******** 6 | // 规则仅对手机网页版有效,如使用APP 请勿添加 7 | 8 | // rewrite 远程订阅地址:https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/jianshu.conf 9 | 10 | ---------- jianshu.conf ------------------ 11 | hostname = www.jianshu.com 12 | 13 | // 先重写到桌面版 14 | ^https:\/\/www\.jianshu\.com\/p url request-header (\r\n)User-Agent:.+(\r\n) request-header $1User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36$2 15 | // 再注入 CSS 进行优化 16 | ^https:\/\/www\.jianshu\.com\/p url script-response-body https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/jianshu.js 17 | ------------- 18 | 19 | ******** 20 | * 频道: https://t.me/elecV2 21 | **/ 22 | 23 | let body = $response.body 24 | 25 | if (/<\/html>|<\/body>/.test(body)) { 26 | body = body.replace('', ``) 29 | 30 | console.log('添加 tamperJS:jianshu.js') 31 | } 32 | 33 | $done({ body }) -------------------------------------------------------------------------------- /betterweb/csdn.req.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 名称: csdn.req.js 3 | * 作用: blog.csdn.net 免跳转应用商店 4 | * 5 | ******** QuantumultX conf ******** 6 | // 规则仅对手机网页版有效,如使用APP 请勿添加 7 | // QuantumultX rewrite 订阅地址: https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/csdn.conf 8 | 9 | hostname = blog.csdn.net, *.openinstall.io 10 | 11 | // 先重写到桌面版 12 | ^https:\/\/blog\.csdn\.net\/ url request-header (\r\n)User-Agent:.+(\r\n) request-header $1User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36$2 13 | 14 | // 再注入 CSS 进行优化 15 | ^https:\/\/blog\.csdn\.net\/.*\/article\/details url script-response-body https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/csdn.res.js 16 | 17 | // 免跳转应用商店(也可以直接 filter 屏蔽 openinstall.io) 18 | ^https:\/\/wvhzpj\.openinstall\.io\/ulink url script-echo-response https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/csdn.req.js 19 | 20 | ******** 21 | * 更新频道: https://t.me/elecV2 22 | **/ 23 | 24 | if (typeof $request !== 'undefined') { 25 | let url = $request.url 26 | let b64 = url.split('/').pop() 27 | let obj = atob(b64) 28 | 29 | obj = JSON.parse(obj) 30 | 31 | $done({ 32 | status: "HTTP/1.1 307 Temporary Redirect", 33 | headers: { "Location": obj.d.url }, 34 | }) 35 | } else { 36 | console.log('csdn.req.js 用于 rewrite 重写规则,请勿直接运行\nBY: https://t.me/elecV2') 37 | $done() 38 | } -------------------------------------------------------------------------------- /tamperJSLog.js: -------------------------------------------------------------------------------- 1 | // tamperJS 日志输出。在网页上显示 console.log/error 的内容。 2 | // 双击展开/收缩,三击清空日志 3 | document.body.insertAdjacentHTML("beforeend",`