次元小镇
https://dimtown.com/
分享者: mengluo9960 (14501)发布时间: 08/21 14:02
会员内容无法查看,优化头像图片显示。
{
"articleStyle": 2,
"cacheFirst": false,
"customOrder": 13,
"enableJs": true,
"enabled": true,
"enabledCookieJar": true,
"lastUpdateTime": 1787291997377,
"loadWithBaseUrl": true,
"loginUrl": "https:\/\/dimtown.com\/users",
"preload": true,
"ruleArticles": "class.kzpost-data",
"ruleContent": "@css:.content_left@html@js:(function(){\n var doc = org.jsoup.Jsoup.parse(result);\n var content = doc.selectFirst('.content_left');\n if (!content) return '<p>暂无内容<\/p>';\n\n \/\/ 移除无关元素\n content.select('style,script,.aggd,.kz-dtpost-div,.myshare').remove();\n\n \/\/ 移除隐藏付费块(常见灰色提示文本)\n var ps = content.select('p');\n for (var i = 0; i < ps.size(); i++) {\n var s = ps.get(i).attr('style') || '';\n if (s.indexOf('color:#707070') > -1) {\n ps.get(i).remove();\n }\n }\n\n \/\/ 精确移除包含付费关键词的元素(从后往前遍历,避免索引错乱)\n var keywords = [\n '资源下载',\n '会员下载',\n '当前隐藏内容需要支付',\n '60贝壳',\n '贝壳购买升级会员',\n '该资源没有添加描述!'\n ];\n var all = content.getAllElements();\n for (var j = all.size() - 1; j >= 0; j--) {\n var el = all.get(j);\n var own = el.ownText();\n for (var k = 0; k < keywords.length; k++) {\n if (own.indexOf(keywords[k]) > -1) {\n el.remove();\n break;\n }\n }\n }\n\n \/\/ 处理图片:放大、索引\n var imgs = content.select('.hig-item img');\n for (var m = 0; m < imgs.size(); m++) {\n var img = imgs.get(m);\n img.attr('style', 'display:block;margin:10px auto;max-width:100%;height:auto;cursor:zoom-in;');\n img.attr('class', 'zoom-img');\n img.attr('onclick', 'zoom(this)');\n }\n\n return content.html() + \n '<script>function zoom(a){var imgs=document.querySelectorAll(\".zoom-img\");var list=[];for(var i=0;i<imgs.length;i++){list.push(imgs[i].src)}var index=list.indexOf(a.src);var overlay=document.createElement(\"div\");overlay.style.cssText=\"position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.92);z-index:9999;display:flex;align-items:center;justify-content:center;flex-direction:column\";var imgBox=document.createElement(\"img\");imgBox.src=a.src;imgBox.style.cssText=\"max-width:95%;max-height:85%;cursor:auto\";var btnBox=document.createElement(\"div\");btnBox.style.cssText=\"position:absolute;bottom:20px;left:0;width:100%;display:flex;justify-content:space-between;padding:0 20px;box-sizing:border-box\";var prev=document.createElement(\"button\");prev.innerText=\"上一张\";prev.style.cssText=\"padding:8px 16px;background:#fff;border:none;border-radius:4px;cursor:pointer\";var next=document.createElement(\"button\");next.innerText=\"下一张\";next.style.cssText=prev.style.cssText;btnBox.appendChild(prev);btnBox.appendChild(next);overlay.appendChild(imgBox);overlay.appendChild(btnBox);overlay.onclick=function(e){if(e.target===overlay){overlay.remove()}};imgBox.onclick=function(e){e.stopPropagation()};prev.onclick=function(e){e.stopPropagation();index=(index-1+list.length)%list.length;imgBox.src=list[index]};next.onclick=function(e){e.stopPropagation();index=(index+1)%list.length;imgBox.src=list[index]};document.body.appendChild(overlay)}<\\\/script>' +\n '<style>img{max-width:100%;display:block;margin:10px auto;cursor:zoom-in}p{margin:0;padding:0}body{background:#fff}<\/style>';\n})()",
"ruleImage": "img.cardImage@data-original",
"ruleLink": "a@href",
"ruleNextPage": "page",
"rulePubDate": ".fr@text",
"ruleTitle": "a@title",
"searchUrl": "https:\/\/dimtown.com\/?s={{key}}",
"showWebLog": false,
"singleUrl": false,
"sortUrl": "插画精选::https:\/\/dimtown.com\/vip-illustration\/page\/{{page}}\nCOS精选::https:\/\/dimtown.com\/vipcos\/page\/{{page}}\n插画美图::https:\/\/dimtown.com\/pixiv-illustration\/page\/{{page}}\n动漫壁纸::https:\/\/dimtown.com\/bizhi\/page\/{{page}}\n手机壁纸::https:\/\/dimtown.com\/acg-wallpaper\/page\/{{page}}\n电脑壁纸::https:\/\/dimtown.com\/pc-wallpaper\/page\/{{page}}\n画师推荐::https:\/\/dimtown.com\/pixiv-painter\/page\/{{page}}\nCOSPLAY::https:\/\/dimtown.com\/cosplay\/page\/{{page}}\n角色特辑::https:\/\/dimtown.com\/role-illustration\/page\/{{page}}\n摄影::https:\/\/dimtown.com\/p\/page\/{{page}}\nJK::https:\/\/dimtown.com\/jk\/page\/{{page}}\nLOLITA::https:\/\/dimtown.com\/lolita\/page\/{{page}}\n汉服::https:\/\/dimtown.com\/hanfu\/page\/{{page}}\n私服::https:\/\/dimtown.com\/sifu\/page\/{{page}}\n展会活动::https:\/\/dimtown.com\/zhhd\/page\/{{page}}\n次元速报::https:\/\/dimtown.com\/acgnews\/page\/{{page}}\n周边::https:\/\/dimtown.com\/hobby\/page\/{{page}}\n动漫头像::https:\/\/dimtown.com\/comictx\/page\/{{page}}\n女生头像::https:\/\/dimtown.com\/lolitx\/page\/{{page}}\n男生头像::https:\/\/dimtown.com\/mantx\/page\/{{page}}\n情侣头像::https:\/\/dimtown.com\/loverstx\/page\/{{page}}\nACG音乐::https:\/\/dimtown.com\/acgmusic\/page\/{{page}}\n美图::https:\/\/dimtown.com\/dmmt\/page\/{{page}}\n头像::https:\/\/dimtown.com\/miaotx\/page\/{{page}}",
"sourceGroup": "图片",
"sourceIcon": "https:\/\/cc-img.townimg.com\/uploads\/2025\/02\/20250205153725576-192x192.png",
"sourceName": "次元小镇",
"sourceUrl": "https:\/\/dimtown.com\/",
"style": "*{margin:0;padding:0}\nimg{width:100%;height:auto;display:block;cursor:zoom-in}",
"type": 0
}