凹凸吧

https://www.tuao.cc

分享者: entelechy4 (13234)发布时间: 10小时前

用AI写了个JS拦截 + 改写图片URL,我是没看懂写的什么玩意

二维码导入
{
    "articleStyle": 2,
    "customOrder": 0,
    "enableJs": true,
    "enabled": true,
    "enabledCookieJar": true,
    "header": "{\n\t \"User-Agent\": \"Mozilla\/5.0 (Linux; U; Android 9; zh-cn; MIX 2S Build\/PKQ1.180729.001) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/100.0.4896.127 Mobile Safari\/537.36 XiaoMi\/MiuiBrowser\/16.7.35 swan-mibrowser\",\n\t \"Referer\": \"{{baseUrl}}\"\n}",
    "lastUpdateTime": 1770862647307,
    "loadWithBaseUrl": true,
    "ruleArticles": ".index-group-content > .index-imgs",
    "ruleContent": "<!-- 介绍区域 -->\n<div class=\"intro-section\">\n    {{@@h1@all}}\n    <p class=\"intro\">\n      {{@@[name=\"description\"]@content}}\n    <\/p>\n    {{@@.text-primary@all}}\n<\/div>\n\n<!-- 套图区域 -->\n<div class=\"gallery-section\">\n    {{@@#rawContent p img@html}}\n   \n<\/div>",
    "ruleImage": "img@data-original||img@src",
    "ruleLink": "a.0@href",
    "ruleNextPage": "[aria-label=\"Next\"]@href",
    "rulePubDate": "ownText##\\?\\..*",
    "ruleTitle": ".index-imgcontent-title@text",
    "singleUrl": false,
    "sortUrl": "最新::\/Articles\/\n无圣光::\/Articles\/Categories\/1\n凸凹图::\/Articles\/Categories\/2\n靓人体::\/Articles\/Categories\/3\n写真集::\/Articles\/Categories\/4\n\n搜索::\/Articles\/Search?wd={{String(source.variable) || \"美女\"}}",
    "sourceComment": "www.tuaow.top",
    "sourceGroup": "美女",
    "sourceIcon": "https:\/\/www.tuao.cc\/Files\/webconfigs\/638254764734047980.png",
    "sourceName": "凹凸吧",
    "sourceUrl": "https:\/\/www.tuao.cc",
    "style": "body {\n  margin: 0;\n  padding: 0;\n  font-family: sans-serif;\n}\n\n\/* 介绍区域:白色背景 *\/\n.intro-section {\n  background-color: #ffffff;\n  color: #333;\n  padding: 16px;\n  \/* 可选:加一点阴影分隔 *\/\n  box-shadow: 0 2px 4px rgba(0,0,0,0.05);\n}\n\n.intro-section h1 {\n  font-size: 1.5rem;\n  margin-top: 0;\n}\n\n.intro-section p {\n  font-size: 1rem;\n  line-height: 1.6;\n}\n\n\/* 套图区域:黑色背景 *\/\n.gallery-section {\n  background-color: #000000;\n  padding: 12px; \/* 图片和边缘留点空隙 *\/\n}\n\n.gallery-section img {\n  width: 100%;\n  height: auto;\n  display: block;\n  margin-bottom: 12px;\n  border-radius: 8px; \/* 可选圆角 *\/\n}\n\n.text-primary {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  gap: 6px;\n}\n\n.text-primary .glyphicon-time {\n  flex-basis: 100%;\n  margin-top: 6px;\n}",
    "injectJs": "(function() {\nfunction fixImages() {\nconst imgs = document.querySelectorAll(\"img\");\nimgs.forEach(img => {\nlet real = img.getAttribute(\"data-original\") || img.getAttribute(\"src\");\n        if (real && real.includes(\"\/LoadImage.ashx\")) {\n            \/\/ 补全域名\n            let url = real.startsWith(\"http\") ? real : \"https:\/\/www.tuao.cc\" + real;\n\n            \/\/ 强制替换\n            img.src = url;\n        }\n    });\n}\n\/\/ 初始执行\nfixImages();\n\/\/ 监听动态加载\nconst observer = new MutationObserver(() => {\n    fixImages();\n});\nobserver.observe(document.body, {\n    childList: true,\n    subtree: true\n});\n})();"
}
广告