微博博主
微博博主
分享者: xiao233666 (525)发布时间: 2023/12/30
原作者:关耳
本人的修改:
*修复一键复制功能并美化页面
*去除微博网页的广告
具体自定义方式请看源注释。
{ "articleStyle": 0, "customOrder": 0, "enableJs": true, "enabled": true, "enabledCookieJar": false, "header": "", "injectJs": "\/\/ 去广告,代码来自ChatGPT\n\/\/ 查找并移除 div.wrap 元素和具有 ad-wrap 类名的元素\nvar wrapElements = document.querySelectorAll('div.wrap');\nvar adWrapElements = document.getElementsByClassName('ad-wrap');\n\nfor (var i = 0; i < wrapElements.length; i++) {\n var wrapElement = wrapElements[i];\n wrapElement.parentNode.removeChild(wrapElement);\n}\n\nwhile (adWrapElements.length > 0) {\n var adWrapElement = adWrapElements[0];\n adWrapElement.parentNode.removeChild(adWrapElement);\n}", "lastUpdateTime": 0, "loadWithBaseUrl": false, "ruleArticles": "$.data.cards[*].card_group[*]||$.data.cards", "ruleContent": "", "ruleDescription": "$.user.id\n@js:\nif (result) {\n var script1 = '<script src=\"http:\/\/yck.mumuceo.com\/static\/extend\/clipboard\/clipboard.min.js\"><\/script>';\n var text = '<span id=\"tar_text\" style=\"display: inline-block; white-space: normal; word-wrap: break-word;\">{{$.user.screen_name}}::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=107603' + result + '_-_WEIBO_SECOND_PROFILE_WEIBO&luicode=10000011&lfid=107603' + result + '_-_WEIBO_SECOND_PROFILE_WEIBO&page_type=03&page={\\{page}}<\/span>';\n var bon = '<button id=\"copy\" onclick=\"copyText()\" style=\"padding: 10px 20px; font-family: Arial, sans-serif; font-size: 16px; color: #fff; background-color: #007bff; border: none; border-radius: 5px; cursor: pointer;\">一键复制<\/button>';\n var script = `\n <script>\n function copyText() {\n var text = document.getElementById('tar_text').innerText;\n var tempInput = document.createElement('input');\n tempInput.setAttribute('value', text);\n document.body.appendChild(tempInput);\n tempInput.select();\n document.execCommand('copy');\n document.body.removeChild(tempInput);\n alert('复制成功!');\n }\n <\/script>\n `;\n result = '<div style=\"margin: 20px; padding: 20px; border: 1px solid #ccc; border-radius: 5px; background-color: #f5f5f5;\">复制以下文字,添加至分类 URL 可订阅用户<br><br>' + script1 + text + '<br><br>' + bon + '<\/div>' + script;\n}", "ruleImage": "$.mblog.page_info.page_pic.url||$.mblog.thumbnail_pic||$.mblog.user.profile_image_url||$.user.profile_image_url", "ruleLink": "$.mblog.id||$.user.id@js:\"https:\/\/m.weibo.cn\/detail\/\"+result", "ruleNextPage": "page", "rulePubDate": "$.mblog.created_at||$.desc1\n@js:\nif(\/\\+0800\/.test(result)){\ndate=new Date(result);\ntime=date.getTime();\nfunction formatDate2(inputTime) {\n var date = new Date(inputTime);\n var y = date.getFullYear();\n var m = date.getMonth() + 1;\n m = m < 10 ? ('0' + m) : m;\n var d = date.getDate();\n d = d < 10 ? ('0' + d) : d;\n return y +'-' + m + '-' + d;\n};\n\nfunction formatDate(now) {\n var time = formatDate2(now)\n var date1 = new Date(now)\n var date2 = new Date()\n var date3 = date2.getTime() - date1.getTime()\n var days = Math.floor(date3 \/ (24 * 3600 * 1000))\n var leave1 = date3 % (24 * 3600 * 1000) \n var hours = Math.floor(leave1 \/ (3600 * 1000))\n var leave2 = leave1 % (3600 * 1000)\n var minutes = Math.floor(leave2 \/ (60 * 1000))\n var leave3 = leave2 % (60 * 1000)\n if (days < 1 && hours < 1) { return minutes + \"分前\" } else if (days < 1) { return hours + \"小时 \" + minutes + \"分前\" } else {\n if (days < 7) {\n return days + \"天 \" + hours + \"小时前 \"\n } else { return time }\n }\n}\n\n'📅 '+formatDate(time)}else{result=result}", "ruleTitle": "$.mblog.text||$.user.screen_name##<.*?>", "shouldOverrideUrlLoading": "", "singleUrl": false, "sortUrl": "发芽虎鲸::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=1076037405187699_-_WEIBO_SECOND_PROFILE_WEIBO&luicode=10000011&lfid=1076037405187699_-_WEIBO_SECOND_PROFILE_WEIBO&page_type=03&page={{page}}\n计量经济好难::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=1076037833649164_-_WEIBO_SECOND_PROFILE_WEIBO&luicode=10000011&lfid=1076037833649164_-_WEIBO_SECOND_PROFILE_WEIBO&page_type=03&page={{page}}\n玛丽苏的肉松小贝::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=1076037307459847_-_WEIBO_SECOND_PROFILE_WEIBO&luicode=10000011&lfid=1076037307459847_-_WEIBO_SECOND_PROFILE_WEIBO&page_type=03&page={{page}}\n搜索用户::https:\/\/m.weibo.cn\/api\/container\/getIndex?containerid=100103type%3D3%26q%3D{{source.getVariable()}}%26t%3D0&page_type=searchall&page={{page}}", "sourceComment": "搜索用户:点击 设置源变量 确认(可能需要清楚后刷新,不然要往下翻)", "sourceGroup": "🌐社交平台订阅", "sourceIcon": "https:\/\/b.bdstatic.com\/searchbox\/mappconsole\/image\/20181024\/1540366708-13657.png", "sourceName": "微博博主", "sourceUrl": "微博博主", "style": "img{max-width: 100%;max-height: 100%}summary{color:#FF2D7A7E}" }