diff --git a/.github/ISSUE_TEMPLATE/03-autoPageRequest.yml b/.github/ISSUE_TEMPLATE/03-autoPageRequest.yml index f812450ec..e27a94a98 100644 --- a/.github/ISSUE_TEMPLATE/03-autoPageRequest.yml +++ b/.github/ISSUE_TEMPLATE/03-autoPageRequest.yml @@ -15,7 +15,7 @@ body: > ### \# 申请必读: > 1. 请先确认 **`不是动态加载内容`** 的网站(**鼠标指向页码,左下角不显示链接即代表是动态加载**),这类网站无法制作规则。 > 2. 如 **`需要登录`** 才能看到内容(无论注册有多简单),请**告诉我账号**,否则我**无法凭空制作**翻页规则(网课类不会支持)。 - > 3. 请直接提供 **`具体页面的网页地址 URL`** (特别是一些**页面很多的网站**),尽量减少我的工作量,否则可能拒绝申请。 + > 3. 请提供希望添加支持的 **`可翻页(含有页码)的具体网页地址`** 以供我编写规则(特别是**页面很多的网站**),尽量减少我的工作量,否则可能拒绝。 > 4. 对于 **`正版小说/漫画`** 网站,因为**反爬防盗**的原因也会导致无法制作规则(该脚本本质上也是爬虫,虽然只爬取下一页,但也会被阻碍)。 > 5. 对于 **`没有 HTTPS`** 的网站(这种网站目前全网占比极少,且大都是一些老旧网站),是不考虑添加支持的。 > 6. 如果你要申请对 `某个博客/论坛系统` 添加支持(即通用规则,所有使用这个博客/论坛系统的网站都会支持),那么需要提供 `官方博客/论坛地址` 及 其他**几个使用该博客/论坛系统的网站地址**,用于对比、验证,才能写出通用规则。 diff --git a/Autopage.user.js b/Autopage.user.js index da9a94439..8d4913b67 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -3,10 +3,10 @@ // @name:zh-CN 自动无缝翻页 // @name:zh-TW 自動無縫翻頁 // @name:ru Автостраничник -// @version 6.6.66 +// @version 6.6.75 // @author X.I.U // @description ⭐Append the next page content to the bottom seamlessly (like a waterfall, Unlimited scrolling, no need to manually click on the next page) ⭐, support various forums, social networking, games, comics, novels, academics, search engines (Google, Bing, Yahoo...) and other websites~ -// @description:zh-CN ⭐无缝加载 下一页内容 至网页底部(类似瀑布流,无限滚动,无需手动点击下一页)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、MyBB、Xiuno、XenForo、NexusPHP...」论坛】【百度、谷歌(Google)、必应(Bing)、搜狗、微信、360、Yahoo、Yandex 等搜索引擎...】、贴吧、豆瓣、知乎、NGA、V2EX、起点中文、千图网、千库网、Pixabay、Pixiv、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、RuTracker、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、小众软件、【动漫狂、动漫屋、漫画猫、漫画屋、漫画 DB、HiComic、Mangabz、Xmanhua 等漫画网站...】、PubMed、Z-Library、GreasyFork、Github、StackOverflow(以上仅一小部分常见网站,更多的写不下了... +// @description:zh-CN ⭐无缝加载 下一页内容 至网页底部(类似瀑布流,无限滚动,无需手动点击下一页)⭐,支持各论坛、社交、游戏、漫画、小说、学术、搜索引擎(Google、Bing、Yahoo...) 等网站~ // @description:zh-TW ⭐無縫加載 下一頁內容 至網頁底部(類似瀑布流,无限滚动,無需手働點擊下一頁)⭐,支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎(Google、Bing、Yahoo...) 等網站~ // @description:ru ⭐Плавно добавляет содержимое следующей страницы к нижней части (как водопад, неограниченная прокрутка, не нужно вручную нажимать на следующую страницу) ⭐, поддерживает различные форумы, соцсети, игры, комиксы, романы, научные статьи, поисковики (Google, Bing, Yahoo...) и другие сайты~ // @match *://*/* @@ -15,26 +15,22 @@ // @connect bitbucket.org // @connect jsd.onmicrosoft.cn // @connect wget.la -// @connect cdn.wget.la // @connect ghfast.top -// @connect raw.ixnic.net // @connect ghproxy.cfd -// @connect raw.github.site -// @connect raw.github.store // @connect raw.dgithub.xyz // @connect ghproxy.net -// @connect github.7boe.top -// @connect github.starrlzy.cn // @connect cdn.jsdmirror.com // @connect js.cdn.haah.net -// @connect gh.akass.cn // @connect raw.kkgithub.com // @connect gcore.jsdelivr.net // @connect fastly.jsdelivr.net // @connect jsd.proxy.aks.moe // @connect jsdelivr.pai233.top -// @connect gh-proxy.com -// @connect hk.gh-proxy.com +// @connect gh-proxy.org +// @connect hk.gh-proxy.org +// @connect hub.glowp.xyz +// @connect g.blfrp.cn +// @connect gh.catmak.name // @connect www.xuexiniu.com // @connect bbs.xuexiniu.com // @connect weili.ooopic.com @@ -95,18 +91,18 @@ (function() { 'use strict'; let urlArr = [ // 外置翻页规则更新地址分流,以确保更新成功率(记得 connect) - 'https://github.7boe.top/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://github.starrlzy.cn/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', 'https://cdn.jsdmirror.com/gh/XIU2/UserScript/other/Autopage/rules.json', - 'https://js.cdn.haah.net/gh/XIU2/UserScript/other/Autopage/rules.json', - 'https://gh.akass.cn/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://raw.kkgithub.com/XIU2/UserScript/master/other/Autopage/rules.json', + //'https://js.cdn.haah.net/gh/XIU2/UserScript/other/Autopage/rules.json', // 证书过期 + //'https://raw.kkgithub.com/XIU2/UserScript/master/other/Autopage/rules.json', // 超时 //'https://gcore.jsdelivr.net/gh/XIU2/UserScript/other/Autopage/rules.json', 'https://fastly.jsdelivr.net/gh/XIU2/UserScript/other/Autopage/rules.json', //'https://jsd.proxy.aks.moe/gh/XIU2/UserScript/other/Autopage/rules.json', //'https://jsdelivr.pai233.top/gh/XIU2/UserScript/other/Autopage/rules.json', - 'https://gh-proxy.com/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://hk.gh-proxy.com/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', + 'https://hub.glowp.xyz/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', + 'https://g.blfrp.cn/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', + 'https://gh.catmak.name/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', + 'https://gh-proxy.org/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', + 'https://hk.gh-proxy.org/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', ] const urlArr2 = [ 'https://userscript.h233.eu.org/other/Autopage/rules.json', @@ -114,13 +110,9 @@ 'https://bitbucket.org/xiu2/userscript/raw/master/other/Autopage/rules.json', 'https://jsd.onmicrosoft.cn/gh/XIU2/UserScript/other/Autopage/rules.json', 'https://wget.la/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://cdn.wget.la/gh/XIU2/UserScript/other/Autopage/rules.json', 'https://ghfast.top/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - //'https://raw.ixnic.net/XIU2/UserScript/master/other/Autopage/rules.json', // 解析空 - 'https://ghproxy.cfd/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - //'https://raw.github.site/XIU2/UserScript/master/other/Autopage/rules.json', // 挂了 - //'https://raw.github.store/XIU2/UserScript/master/other/Autopage/rules.json', // 挂了 - 'https://raw.dgithub.xyz/XIU2/UserScript/master/other/Autopage/rules.json', + //'https://ghproxy.cfd/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', // 超时 + //'https://raw.dgithub.xyz/XIU2/UserScript/master/other/Autopage/rules.json', // 证书挂了 //'https://ghproxy.net/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', // 挂了 ], loadMoreExclude1 = ['.smzdm.com','stackoverflow.com'], @@ -335,7 +327,9 @@ } - if (getCSS('a.next, a.next-page')) { + if (getCSS('a.next.page-numbers, a.next-page.page-numbers')) { + DBSite.wp_article.pager.nextL = 'a.next.page-numbers, a.next-page.page-numbers' + } else if (getCSS('a.next, a.next-page')) { DBSite.wp_article.pager.nextL = 'a.next, a.next-page' } else if (getCSS('a[rel="next" i], a[aria-label="next" i], a[aria-label="下一个"].page-link, a[aria-label="Next Page" i], a[aria-label="下一页"], a[rel="下一页"], a[title="下一页"], a[aria-label="下一頁"], a[rel="下一頁"], a[title="下一頁"]')) { DBSite.wp_article.pager.nextL = 'a[rel="next" i], a[aria-label="next" i], a[aria-label="下一个"].page-link, a[aria-label="Next Page" i], a[aria-label="下一页"], a[rel="下一页"], a[title="下一页"], a[aria-label="下一頁"], a[rel="下一頁"], a[title="下一頁"]' @@ -417,8 +411,8 @@ console.info(`[自动无缝翻页] - <笔趣阁 1 - 手机版> 模板的小说网站`); return 201; } else if (getCSS('#txt, .txt') && getCSS('#pb_next, .url_next') && getCSS('.chapter-control, .chapter-page-btn')) { console.info(`[自动无缝翻页] - <笔趣阁 2> 模板的小说网站`); return 202; - } else if ((getCSS('meta[name="description" i][content*="小说"], meta[name="description" i][content*="章节"], meta[name="description" i][content*="阅读"], meta[name="description" i][content*="小說"], meta[name="description" i][content*="章節"], meta[name="description" i][content*="閲讀"], meta[name="keywords" i][content*="笔趣"]') || location.hostname.indexOf('biqu')!=-1 || document.title.match(/笔趣阁|小说|小說|章/)!=null) && getXpath('//a[contains(text(), "下一章") or contains(text(), "下一页") or contains(text(), "下一节")]')) { - let biquge3_pageE= ['[id="chapter_content" i]','[class~="chapter_content" i]','[id="chaptercontent" i]','[class~="chaptercontent" i]','[class~="read_chapterdetail" i]','[id="booktext" i]','[class~="booktext" i]','[id="txtcontent" i]','[class~="txtcontent" i]','[id="textcontent" i]','[class~="textcontent" i]','[id="read-content" i]','[class~="read-content" i]','[id="txtnav" i]','[class~="txtnav" i]','[id="txt" i][class~="txt" i]','[id="contents" i]','[class~="contents" i]','[id="content" i]','[class~="content" i]','[id="contentbox" i]'] + } else if ((getCSS('meta[name="description" i][content*="小说"], meta[name="description" i][content*="章节"], meta[name="description" i][content*="阅读"], meta[name="description" i][content*="小說"], meta[name="description" i][content*="章節"], meta[name="description" i][content*="閲讀"], meta[name="keywords" i][content*="笔趣"]') || location.hostname.indexOf('biqu')!=-1 || document.title.match(/笔趣阁|书库|小说|小說|章/)!=null) && getXpath('//a[contains(text(), "下一章") or contains(text(), "下一页") or contains(text(), "下一节")][not(starts-with(@href,"javascript:"))]')) { + let biquge3_pageE= ['[id="chapter_content" i]','[class~="chapter_content" i]','[id="chaptercontent" i]','[class~="chaptercontent" i]','[class~="read_chapterdetail" i]','[id="booktext" i]','[class~="booktext" i]','[id="txtcontent" i]','[class~="txtcontent" i]','[id="textcontent" i]','[class~="textcontent" i]','[id="read-content" i]','[class~="read-content" i]','[id="txtnav" i]','[class~="txtnav" i]','[id="txt" i][class~="txt" i]','[id="contents" i]','[class~="contents" i]','[id="content" i]','[class~="content" i]','[id="acontent" i]','[class~="acontent" i]','[id="contentbox" i]','.container>.con'] for(let biquge3_pageE_ of biquge3_pageE) {if (getAllCSS(biquge3_pageE_).length === 1) {DBSite.biquge3.pager.pageE = biquge3_pageE_;DBSite.biquge3.pager.insertP = [biquge3_pageE_,6];DBSite.biquge3.style = biquge3_pageE_+'>.readinline, ' + DBSite.biquge3.style;break;}} if (DBSite.biquge3.pager.pageE != undefined) {console.info(`[自动无缝翻页] - <笔趣阁 3> 模板的小说网站`); return 203;} } @@ -573,6 +567,9 @@ function: { url: ()=> { if (!indexOF('/post/') && !getCSS('#comments, .comments-area, #disqus_thread')) { curSite = DBSite.wp_article; + if (!getCSS(DBSite.wp_article.pager.replaceE)){ // 如果没找到常见的页码父元素,则删除 replaceE 让脚本自行判断 + delete curSite.pager.replaceE + } // 自适应瀑布流样式 setTimeout(()=>{if (getOne(curSite.pager.pageE).style.cssText.indexOf('position: absolute') != -1){insStyle(curSite.pager.pageE + '{position: static !important; float: left !important; height: '+ parseInt(getCSS(curSite.pager.pageE).offsetHeight * 1.1) + 'px !important;}');}}, 1500); } @@ -1687,8 +1684,44 @@ function: { // 翻页类型 1/3 function getPageE(url) { - if (!curSite.gmxhr) { - // 依靠原生 XMLHttpRequest 尝试解决因缺失跨域 cookie 导致的问题(比如一些使用 Cloudflare CDN 人机验证的网站,会出现脚本后台获取到人机验证页面) + // Chrome 浏览器可以依靠改用原生 XMLHttpRequest 尝试解决因缺失跨域 cookie 导致的问题(比如一些使用 Cloudflare CDN 人机验证的网站,会出现脚本后台获取到人机验证页面) + // Firefox 浏览器则需要使用 GM_xmlhttpRequest 的 cookiePartition 参数来解决(该参数要 Tampermonkey v5.2 及以上才有) + // 如果翻页规则有 curSite.gmxhr 或是 Firefox 浏览器,则依然使用 GM_xmlhttpRequest+cookiePartition,反之则使用原生 XMLHttpRequest + if (curSite.gmxhr || navigator.userAgent.includes('Firefox')) { + GM_xmlhttpRequest({ + url: url, + method: 'GET', + //overrideMimeType: 'text/html; charset=' + (document.characterSet||document.charset||document.inputEncoding), + responseType: 'arraybuffer', // Firefox 浏览器下 Tampermonkey 访问 GBK 网站时会乱码,只能改为 TextDecoder 手动转换编码 + headers: { + 'x-requested-with': (curSite.xRequestedWith === true) ? 'XMLHttpRequest':null, + 'Referer': (curSite.noReferer === true) ? null:location.href, + 'Accept': 'text/html,application/xhtml+xml,application/xml' + }, + cookiePartition: { // https://github.com/Tampermonkey/tampermonkey/issues/2057 + topLevelSite: location.origin + }, + timeout: 5000, + onload: function (response) { + try { + //console.log('URL:' + url, '最终 URL:' + response.finalUrl, '返回内容:' + response.responseText, response) + processElems(createDocumentByString((new TextDecoder((document.characterSet||document.charset||document.inputEncoding))).decode(response.response))); + //processElems(createDocumentByString(response.responseText)); + } catch (e) { + console.error('[自动无缝翻页] - 处理获取到的下一页内容时出现问题,请检查!\n', e, '\nURL:' + url, '\n最终 URL:' + response.finalUrl, '\n返回状态:' + response.statusText, '\n返回内容:' + response.responseText); + } + }, + onerror: function (response) { + console.log('URL:' + url, response) + GM_notification({text: '❌ 获取下一页失败...', timeout: 5000}); + }, + ontimeout: function (response) { + setTimeout(function(){curSite.pageUrl = '';}, 3000) + console.log('URL:' + url, response) + GM_notification({text: '❌ 获取下一页超时,可 3 秒后再次滚动网页重试(或尝试刷新网页)...', timeout: 5000}); + } + }); + } else { const xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.overrideMimeType('text/html; charset=' + (document.characterSet||document.charset||document.inputEncoding)); @@ -1716,37 +1749,9 @@ function: { GM_notification({text: '❌ 获取下一页超时,可 3 秒后再次滚动网页重试(或尝试刷新网页)...', timeout: 5000}); }; xhr.send(); - } else { - GM_xmlhttpRequest({ - url: url, - method: 'GET', - overrideMimeType: 'text/html; charset=' + (document.characterSet||document.charset||document.inputEncoding), - headers: { - 'x-requested-with': (curSite.xRequestedWith === true) ? 'XMLHttpRequest':null, - 'Referer': (curSite.noReferer === true) ? null:location.href, - 'Accept': 'text/html,application/xhtml+xml,application/xml' - }, - timeout: 5000, - onload: function (response) { - try { - //console.log('URL:' + url, '最终 URL:' + response.finalUrl, '返回内容:' + response.responseText) - processElems(createDocumentByString(response.responseText)); - } catch (e) { - console.error('[自动无缝翻页] - 处理获取到的下一页内容时出现问题,请检查!\n', e, '\nURL:' + url, '\n最终 URL:' + response.finalUrl, '\n返回状态:' + response.statusText, '\n返回内容:' + response.responseText); - } - }, - onerror: function (response) { - console.log('URL:' + url, response) - GM_notification({text: '❌ 获取下一页失败...', timeout: 5000}); - }, - ontimeout: function (response) { - setTimeout(function(){curSite.pageUrl = '';}, 3000) - console.log('URL:' + url, response) - GM_notification({text: '❌ 获取下一页超时,可 3 秒后再次滚动网页重试(或尝试刷新网页)...', timeout: 5000}); - } - }); } } + // 翻页类型 4 function getPageE_(url, type = '', method = 'GET', data = '', type2) { let mimeType,accept; @@ -1903,7 +1908,7 @@ function: { let scrollHeight = (iframe.contentWindow.document.documentElement.scrollHeight || iframe.contentWindow.document.body.scrollHeight)/10 iframe.contentWindow.scrollTo(0, 999999); iframe.contentWindow.scrollTo(0, scrollHeight*time1); - if (++time1 == 10) { + if (++time1 == 12) { clearInterval(time2); processElems(iframe.contentWindow.document); // 插入/替换元素等 pausePage = true; // 恢复翻页 @@ -2736,7 +2741,13 @@ function: { GM_setValue('menu_customRules', customRules) location.reload(); } catch (e) { - const match = e.message.match(/at position (\d+)/),position = parseInt(match[1]); + let match = e.message.match(/at position (\d+)/),position; + if (match) { + position = parseInt(match[1]); + } else { + match = e.message.match(/line (\d+) column (\d+)/i); + position = calculatePositionFromLineColumn(customRules,match[1],match[2]) + } console.error('自定义规则存在格式错误:\n' + e.message + '\n错误位置为该区域中间:\n------\n' + customRules.slice((position<30)?0:position-30,position+29) + '\n------\n\n常见格式错误:\n1. 逗号:每组 { } 中的最后一个值末尾不能加逗号\n2. 转义:如果正则表达式中含有转义符 \\ 那就要对其再次转义为 \\\\\n3. 引号:规则中冒号左右的内容都需要加上双引号,如果内容中含有双引号则需要对双引号转义(即 \\" 这样),或改为单引号') window.alert('自定义规则存在格式错误:\n' + e.message + '\n错误位置为该区域中间:\n------\n' + customRules.slice((position<30)?0:position-30,position+29) + '\n------\n点击【确定】后脚本会为你定位并选中编辑框中格式错误的文本(部分格式错误定位可能不太精确,但错误一定是在选中文本的附近,如果是选中了行首的空格,则说明格式错误来自上一行末尾逗号)\n\n常见格式错误:\n1. 逗号:每组 { } 中的最后一个值末尾不能加逗号\n2. 转义:如果正则表达式中含有转义符 \\ 那就要对其再次转义为 \\\\\n3. 引号:规则中冒号左右的内容都需要加上双引号,如果内容中含有双引号则需要对双引号转义(即 \\" 这样),或改为单引号'); customRules_textarea.selectionStart = position-1; // 选中开始位置 @@ -2747,6 +2758,40 @@ function: { getCSS('#Autopage_customRules_cancel', shadowRoot).onclick = function () {document.documentElement.style.overflow = document.body.style.overflow = ''; getCSS('#Autopage_customRules').remove();} } + /** + * 根据行号和列号计算字符串中的 position 位置 + * @param {string} text - 完整的文本内容 + * @param {number} line - 行号(从1开始) + * @param {number} column - 列号(从1开始) + * @returns {number} position 位置(从0开始) + */ + function calculatePositionFromLineColumn(text, line, column) { + if (!text || line < 1 || column < 1) { + return -1; + } + + const lines = text.split('\n'); + + // 如果指定行超过文本行数,返回-1 + if (line > lines.length) { + return -1; + } + + let position = 0; + + // 计算前 (line-1) 行的总长度(包括换行符) + for (let i = 0; i < line - 1; i++) { + position += lines[i].length + 1; // +1 表示换行符 + } + + // 计算当前行的列位置(列号从1开始,position从0开始) + // 注意:列号不能超过当前行的长度+1(+1表示可以指向行尾) + const currentLine = lines[line - 1]; + const columnPosition = Math.min(column - 1, currentLine.length); + + return position + columnPosition; + } + // 自定义的 stringify 函数,将 [ ] 内的元素从默认的 换行显示 格式化为 一行显示,用于显示自定义翻页规则等给用户看的场景 function customStringify(obj) { return JSON.stringify(obj, null, 4) diff --git a/DarkMode.user.js b/DarkMode.user.js index 61f237e65..bc83ea2f7 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -3,13 +3,14 @@ // @name:zh-CN 护眼模式 // @name:zh-TW 護眼模式 // @name:ru Тёмный режим -// @version 1.5.5 +// @version 1.5.8 // @author X.I.U // @description Simple and effective network-wide eye protection mode (night mode, dark mode, black mode) // @description:zh-CN 简单有效的全网通用护眼模式(夜间模式、暗黑模式、深色模式) // @description:zh-TW 簡單有效的全網通用護眼模式(夜間模式、暗黑模式、深色模式) // @description:ru Простой и эффективный режим защиты глаз по всей сети (ночной режим, тёмный режим, чёрный режим) // @match *://*/* +// @exclude https://live.bilibili.com/* // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAALfElEQVRYhX2Xe3Bd1XXGf3vvc859X+nq6nUlW5Yly7JlI2xsYzAwtnk4ATpAxkNTHm0mnaTT/gHTTvrIBDLTpp1JUoZppqHQls5AKTR2INOWJJQSXF4x2BhsJCRZ8kuWZckPSVf3/Trn7N3RVTFpQrNn1l97n7O/vda31reWMKMPcmUJA9U8vrwHGdqCHn4HPzePaIxhVSoYbYRXrn7BeMVbCUduF6kVUXHwvQP+6amDaqDnoIompmQytaBnTmB8H5lowrjgFss48SBeI/hUEEZeudLi1ywhJEIJdL6Q8rzal/1a5SGC4XZrYBvWwEZobMdLdH6RH+z/Io1taEeh52fe8tOZbysl/ouWFvANYP7fSz4DgAEBBIL4xiS8ubmnVcTZK68aRK29Dtm8dgnZJydRW+/E2nrnp19nz+7U77+60zt0qMz07J/KxuQTwrIw4rMBCDP6wC+FIIcO34eudDdXf/7jD52Opi772lugY3AZr++hp06gz48j+waRqTWYmVHcS+chEMFeuw1hBzBzY7g/fQE9fmqBYPzBQKrpVa/R4OkCAnXlSvXnX9sIllk220BE4Z8OdHoj54YCK6Od1i2/iUmuRyDRk6NUn3+M0pv/hnf0AE40jEjEqP3oe6Rf/CGOWUTNjFKby2MP7EBtugURFWFxfOhB4+o4yfhrGAdZsxHaqZt6dNce9KXYFSPfGWS68JFqTXSqO7+MCaTqETGTwxSeeoRCOoPT2YUIhFC2jbQF/uwUatU6rPbVUM5T+OfHUO3dWKv6kSsGUIOD6PEPr+fswnanpecFZYVQhFAyjPS9Tj4xw2rcU+pJApEutWsvRjaBW8NUShilkE1JIqlUPfi6VMLNFTBVr+7KYKqJ8uEjlM+dJrR5K0L7eB+9hTd2CFrWYt33h0jH3O5Nj37TBGtgZUBkUN/6q4dQ7UmsnlW450//gU5PPRq460uQXAu+j//i99A/+UdUMoXqbMNkz2OnUkixlF4u9spe/HMTULyEaA7jXkoT2fEbQIXi838DJ4cRDXHkEjc2b0MPHdptZubGpBUbM0UfKQpBRDmKWRSD3tTMk87gddA2WGe4+dkzMD0CyQ5qP/4XVDCAvfkaLMvHamzEClpQzGDF46iuJOH1CaKr2tDZRfzhQ0Ru24NYsYrCM4/jDb+FiHdi3XU/0s3vr7WsGKxcfyPSy+bxi0UqJ8f/IriiE2vrnuWsLefQk8NoO4AMBBB9/XjDI6hQCjdTxq9WCaQ6ULaDFrIeKr3oIlv70Olz2K1xlAVaSUQojD786nKi9e5A3LBHMHn0W+LUUaS1FI9q+iZZWLhHdq/FxFbWSSfsIDIQwVw4g/GK2OuuhloNMzaCaF+DNBJtQfX8LFYigElX0OkQtZKHVy3jqwDlqWncCzPI3nU4t+2FWrH+OLHzHpRl3109memTOhqDi9NfkefHEKvWLTO+VKD68Qf4G27CueFWhJ/Df+0lVFcXJOJYnobm1ZjsJUxuFjyDjK/GNK2gND4ESuDPXcCOSaI7thPqX0ft8OtUn/oTKOQgkET39KJU4RbpZXOtNRW717p+FyRSdYT+v36H4u/fQXbfc3iRDkT3FsTGjWAWEU0OZKfAU9CyEdXVD2lQPduplmo4jkBEbMzK1VgDu5EVTe3gm1RHx6Bcxpz6YLkEO0lMYeFGi6z7eVMqhkT/ZrCb0LNT+NMTRH/nt/BLRdy3X8Nv68Lu6cZEHURjE6K3hirYeLRhDWyA4jxzH40RXJwkeuM29MpN+JcziEsz+Avz6GgcW1pYbUlEQCyHwYpSyxS7rGo+v8man4ZMATrAHf+QSt7FTkWR4QbsjlbIX8IMH0VuuAqj4piGAbhmEPPzI/injnNxMUPuwOtseOIxKKTJ7/8BTBxDdXcjO9sJdTeg01VqH4wg3CDB9bshHMKORbGolVOmeRW09dVdUxkbp3ruNM7GXnS1hK5OYSoSbBDZBcxCBtF3DcUzk6hkhGA0RmtHKx1rOkE04lbzWC1tqMRt1CZHUafPIs8H6/JsNTcgN+9YFq1qgbBUFUvnK9qrVghXCvWN8MBmivueJDtylqaeBKWJaXR4JZEtNyBWrkGt6AJboCZO4J49Rc64xGIhcgtZgm6egKhgtUQQto17WeHOLqCNj5Vowbr7q4j+Lcs1JhhEphcXLTebd0jPwpkx6Lwa++bbCR95ALecp5a6BrvrJoLdHajmMOTnKb3+BrVMntjARpzeFbz8jcfpa22gGm+kMJlm95Zu9M9+iI5G0G3d6EgIUSnjzs/gv/Icgd6rqcvz0IeYWnXc8pEtYnEe8gtXNL7xz74LehHSE3DqNP7EIdx3p5DSh7JNJePiBE/gN3Uz8NWHae5sRJYXqKQvU+raQPg7L6L3/QNMHcfp6EREGjC5LDp9GaOs5VQ/NQI93YctOxFPlwniDh/C3n47JHvrQPTBl3DHjiIDQUQ4jGhOYcqaQFuE0Nl53OnLRHfsZV33KsTxd6GlHeaP477zMl5uAWv7dkyLg6kZREsb+vgCcvPOuoaYuWNQWERs3jAuQ6nooXK6TH566cXnrjQK7uwFaoseWA3oJf2WEhEJUjm/gMgXCfdvQlFFv/R3uCND6FIRv7MfMnOIiaPoI/8NEb2kWAhfoLbdjLr2jmUv/8f+pVbkHRGNnZHum2/udxxtCn4j/vgEIjNTD4O9upfIprUYoxBKo9Z14jumTq7YYD9WayvuR++hs1lkshmha4iuNeDYiIAFMoCevIi+cJHaa29gmvsRTUn0R29g9u1D7bxxv+jrRnpD56cCkdjfV9NzpA+8A5VlLojWAczlGVTAYKXimIU8MlsjtKEXgiF0aRGdm8cEYnXm+O+/gdAGuWsP3shhTHoOEYqCCEF2DsrF5f+e/xiikUldrT6l3z+GevSaTahaZdRY6uFqxRXR1sRyzU/21Gu6OTOMfzmPd6kI8TgiX8B4imouj1QCKmVUNITJ59AnR1F77kH4ZaRnQFroMyeRW3egdt6DwIX391Gshv+4LK2jtcuLqK9t7ALjZXzH1uVM/mb/7BTRnjZEex+idQ2EAnjjR/BdF1PIoV2Bae/F/fh9dL5IYE0XUmpMNo+ev4AINSJWb0UPHa63Z7SvRN3/CHJpFHj2G4iZzAuBbTu+GWpIEGxrQ/3RnlvxG5M4kYa3Lc2u4uyFblnIE+xfAbF2RMtqZGsn/uTYUgHH+dz9eFMnqYx8gO+CEwkjhcDPF/DLHurSaeTm3RiWMsDHeuDrSFvBv3+bi08+N1Vwuj/vZWtu+dwclZlFrESoeZmZysJXoTsCjnVk8dDQBuN+n8RDD9fbcdG7leBX1iOkQjhBOHmQfKGAHW3CS6fR+QClmYuYMyPY265DtPVgtfctiw4V/GcfYfGNQzj3/u4DqlormUoZEQwuc0I//eSnY4G0wPJjmdGhw+mh0fWxNZ0037cXccPd1MXgk+GjNE/tR3+Le+YEyg5TnT6LXlwgcu1u7C99HZlsv3K2+vjvkTs2RvDe3747tm7Dy1SKvzSYPP/MLwxFAkIKEzEye2zswOXX395lJyK0fOFzRHfuglQfqPin59Nn0RNDuJk09vprkd0brmx5H7xCbfgQbrZ83OkfvN1pj0+ZmkBYNhjzCwCeffr/AsBDJyU6kqBwbPzRuTcP/GXV82lYlaJpfQ+BjVdhXX0tNKTAjvzKqKXPTeC++1NKY0c9kVz1SGzb9X8tjIdfzSFCDfUw/noA0scPuxBrwcvmmH3rQIvMm3/y0XdJS4JfIpiIUG9g+wcg6KDnZpGZNDQ0Ii5cSAtlPRHYct13axWvJNwadiiAli4iEP8VAJ89HQtR129TLiG1nos0Nt8dSOi12qi9lRq3utVqT/lirql24hW3vLBQi3d3XUqu73+PZOonBNR/WnbYSMeGTO5/Xf6ZtwDwPwtFRezQVs+sAAAAAElFTkSuQmCC // @grant GM_registerMenuCommand // @grant GM_unregisterMenuCommand @@ -440,14 +441,14 @@ clearInterval(timer); // 取消定时器(每 5 毫秒一次的) setTimeout(function(){ // 为了避免太快 body 的 CSS 还没加载上,先延迟 150 毫秒(缺点就是可能会出现短暂一闪而过的暗黑滤镜) console.log('[护眼模式] html:', window.getComputedStyle(document.lastElementChild).backgroundColor, 'body:', window.getComputedStyle(document.body).backgroundColor) - if (window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastElementChild).backgroundColor === 'rgba(0, 0, 0, 0)' && !(document.querySelector('head>meta[name="color-scheme"],head>link[href^="resource:"]') && window.matchMedia('(prefers-color-scheme: dark)').matches)) { - // 如果 body 没有 CSS 背景颜色(或是在资源页 且 浏览器为白天模式),那就需要添加一个背景颜色,否则影响滤镜效果 + if (!(checkChallenge()) && window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastElementChild).backgroundColor === 'rgba(0, 0, 0, 0)' && !(document.querySelector('head>meta[name="color-scheme"],head>link[href^="resource:"]') && window.matchMedia('(prefers-color-scheme: dark)').matches)) { + // 如果不是在 (CF CDN 的人机验证页面 且 浏览器为暗黑模式) 或 body 没有 CSS 背景颜色(或是在资源页 且 浏览器为白天模式),那就需要添加一个背景颜色,否则影响滤镜效果 let style_Add2 = document.createElement('style'); style_Add2.id = 'XIU2DarkMode2'; document.lastElementChild.appendChild(style_Add2).textContent = style_00; - } else if ((document.querySelector('head>meta[name="color-scheme"],head>link[href^="resource:"]') && window.matchMedia('(prefers-color-scheme: dark)').matches) || (document.querySelector('html[class*=dark], html[data-dark-theme*=dark], html[data-theme*=dark], html[data-color-mode*=dark], body[class*=dark]')) || (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)') || (getColorValue(document.body) > 0 && getColorValue(document.body) < 898989) || (getColorValue(document.lastElementChild) > 0 && getColorValue(document.lastElementChild) < 898989) || (window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastElementChild).backgroundColor === 'rgb(0, 0, 0)')) { - // 如果是在资源页 且 浏览器为暗黑模式,或 html/body 元素包含 dark 标识,或底色为黑色 (等于0,0,0) 或深色 (小于 89,89,89),就停用本脚本滤镜 + } else if (checkChallenge() || (document.querySelector('head>meta[name="color-scheme"],head>link[href^="resource:"]') && window.matchMedia('(prefers-color-scheme: dark)').matches) || (document.querySelector('html[class*=dark], html[data-dark-theme*=dark], html[data-theme*=dark], html[data-color-mode*=dark], body[class*=dark]')) || (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)') || (getColorValue(document.body) > 0 && getColorValue(document.body) < 898989) || (getColorValue(document.lastElementChild) > 0 && getColorValue(document.lastElementChild) < 898989) || (window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastElementChild).backgroundColor === 'rgb(0, 0, 0)')) { + // 如果是在 (CF CDN 的人机验证页面 且 浏览器为暗黑模式) 或 (资源页 且 浏览器为暗黑模式),或 html/body 元素包含 dark 标识,或底色为黑色 (等于0,0,0) 或深色 (小于 89,89,89),就停用本脚本滤镜 if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) for (let i=0;imeta[name="color-scheme"],head>link[href^="resource:"]') && window.matchMedia('(prefers-color-scheme: dark)').matches) || (document.querySelector('html[class*=dark], html[data-dark-theme*=dark], html[data-theme*=dark], html[data-color-mode*=dark], body[class*=dark]')) || (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)') || (getColorValue(document.body) > 0 && getColorValue(document.body) < 898989) || (getColorValue(document.lastElementChild) > 0 && getColorValue(document.lastElementChild) < 898989) || (window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastElementChild).backgroundColor === 'rgb(0, 0, 0)')) { - // 如果是在资源页 且 浏览器为暗黑模式,或 html/body 元素包含 dark 标识,或底色为黑色 (等于0,0,0) 或深色 (小于 89,89,89),就停用本脚本滤镜 + if (checkChallenge() || (document.querySelector('head>meta[name="color-scheme"],head>link[href^="resource:"]') && window.matchMedia('(prefers-color-scheme: dark)').matches) || (document.querySelector('html[class*=dark], html[data-dark-theme*=dark], html[data-theme*=dark], html[data-color-mode*=dark], body[class*=dark]')) || (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)') || (getColorValue(document.body) > 0 && getColorValue(document.body) < 898989) || (getColorValue(document.lastElementChild) > 0 && getColorValue(document.lastElementChild) < 898989) || (window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastElementChild).backgroundColor === 'rgb(0, 0, 0)')) { + // 如果是在 (CF CDN 的人机验证页面 且 浏览器为暗黑模式) 或 (资源页 且 浏览器为暗黑模式),或 html/body 元素包含 dark 标识,或底色为黑色 (等于0,0,0) 或深色 (小于 89,89,89),就停用本脚本滤镜 if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) for (let i=0;imeta[content*="https://challenges.cloudflare.com"]') && document.querySelector('body>script[nonce]')) + } + // 获取背景颜色值 function getColorValue(e) { let rgbValueArry = window.getComputedStyle(e).backgroundColor.replace(/rgba|rgb|\(|\)| /g, '').split (',') diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index 73baa109c..32ab3a23d 100644 --- a/GithubEnhanced-High-Speed-Download.user.js +++ b/GithubEnhanced-High-Speed-Download.user.js @@ -3,18 +3,14 @@ // @name:zh-CN Github 增强 - 高速下载 // @name:zh-TW Github 增強 - 高速下載 // @name:ru Улучшение GitHub – быстрое скачивание -// @version 2.6.30 +// @version 2.6.38 // @author X.I.U // @description High-speed download of Git Clone/SSH, Release, Raw, Code(ZIP) and other files (Based on public welfare), project list file quick download (☁) // @description:zh-CN 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件 (公益加速)、项目列表单文件快捷下载 (☁) // @description:zh-TW 高速下載 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件 (公益加速)、項目列表單文件快捷下載 (☁) // @description:ru Высокоскоростная загрузка Git Clone/SSH, выпусков, изначальных файлов, кода (ZIP) и других файлов (на основе общественного благосостояния), быстрая загрузка файлов из списка проектов (☁) // @match *://github.com/* -// @match *://hub.whtrys.space/* -// @match *://dgithub.xyz/* -// @match *://kkgithub.com/* -// @match *://github.site/* -// @match *://github.store/* +// @match *://bgithub.xyz/* // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAACEUExURUxpcRgWFhsYGBgWFhcWFh8WFhoYGBgWFiUlJRcVFRkWFhgVFRgWFhgVFRsWFhgWFigeHhkWFv////////////r6+h4eHv///xcVFfLx8SMhIUNCQpSTk/r6+jY0NCknJ97e3ru7u+fn51BOTsPCwqGgoISDg6empmpoaK2srNDQ0FhXV3eXcCcAAAAXdFJOUwCBIZXMGP70BuRH2Ze/LpIMUunHkpQR34sfygAAAVpJREFUOMt1U+magjAMDAVb5BDU3W25b9T1/d9vaYpQKDs/rF9nSNJkArDA9ezQZ8wPbc8FE6eAiQUsOO1o19JolFibKCdHGHC0IJezOMD5snx/yE+KOYYr42fPSufSZyazqDoseTPw4lGJNOu6LBXVUPBG3lqYAOv/5ZwnNUfUifzBt8gkgfgINmjxOpgqUA147QWNaocLniqq3QsSVbQHNp45N/BAwoYQz9oUJEiE4GMGfoBSMj5gjeWRIMMqleD/CAzUHFqTLyjOA5zjNnwa4UCEZ2YK3khEcBXHjVBtEFeIZ6+NxYbPqWp1DLKV42t6Ujn2ydyiPi9nX0TTNAkVVZ/gozsl6FbrktkwaVvL2TRK0C8Ca7Hck7f5OBT6FFbLATkL2ugV0tm0RLM9fedDvhWstl8Wp9AFDjFX7yOY/lJrv8AkYuz7fuP8dv9izCYH+x3/LBnj9fYPBTpJDNzX+7cAAAAASUVORK5CYII= // @grant GM_registerMenuCommand // @grant GM_unregisterMenuCommand @@ -38,37 +34,23 @@ const download_url_us = [ ['https://gh.h233.eu.org/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@X.I.U/XIU2] 提供'], //['https://gh.api.99988866.xyz/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [github.com/hunshcn/gh-proxy] 提供'], // 官方演示站用的人太多了 - ['https://ghproxy.1888866.xyz/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [WJQSERVER-STUDIO/ghproxy] 提供'], - ['https://gh.ddlc.top/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@mtr-static-official] 提供'], // Error 1027 - //['https://gh2.yanqishui.work/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@HongjieCN] 提供'], // 错误 - //['https://dl.ghpig.top/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [feizhuqwq.com] 提供'], // ERR_SSL_VERSION_OR_CIPHER_MISMATCH - //['https://gh.flyinbug.top/gh/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [Mintimate] 提供'], // 错误 - //['https://gh.con.sh/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh.con.sh] 提供'], // Suspent due to abuse report. - //['https://ghps.cc/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [ghps.cc] 提供'], // 提示 blocked - ['https://gh-proxy.com/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh-proxy.com] 提供'], - //['https://hk.gh-proxy.com/https://github.com', '其他', '[中国香港] - 该公益加速源由 [gh-proxy.com] 提供'], + ['https://rapidgit.jjda.de5.net/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [热心网友] 提供'], + ['https://gh.ddlc.top/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@mtr-static-official] 提供'], + ['https://gh-proxy.org/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh-proxy.com] 提供'], + //['https://hk.gh-proxy.org/https://github.com', '其他', '[中国香港] - 该公益加速源由 [gh-proxy.com] 提供'], + ['https://cdn.gh-proxy.org/https://github.com', '其他', '[Fastly CDN] - 该公益加速源由 [gh-proxy.com] 提供'], + ['https://edgeone.gh-proxy.org/https://github.com', '其他', '[edgeone] - 该公益加速源由 [gh-proxy.com] 提供'], ['https://cors.isteed.cc/github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@Lufs\'s] 提供'], - ['https://hub.gitmirror.com/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [GitMirror] 提供'], - //['https://down.sciproxy.com/github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [sciproxy.com] 提供'], // 522 - ['https://ghproxy.cfd/https://github.com', '美国', '[美国 洛杉矶] - 该公益加速源由 [@yionchilau] 提供'], - //['https://github.site', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@yionchilau] 提供'], // 挂了 - //['https://github.store', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@yionchilau] 提供'], // 挂了 - //['https://gh.jiasu.in/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@0-RTT] 提供'], // 404 + ['https://ghproxy.it/https://github.com', '美国', '[美国 洛杉矶] - 该公益加速源由 [@yionchilau] 提供'], ['https://github.boki.moe/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [blog.boki.moe] 提供'], - //['https://github.moeyy.xyz/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [moeyy.cn] 提供'], // 墙了 - ['https://gh-proxy.net/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh-proxy.net] 提供'], - //['https://github.yongyong.online/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [github.yongyong.online] 提供'], // 空白 - //['https://ghdd.862510.xyz/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [ghdd.862510.xyz] 提供'], // turnstile token missing ['https://gh.jasonzeng.dev/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh.jasonzeng.dev] 提供'], ['https://gh.monlor.com/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh.monlor.com] 提供'], - ['https://fastgit.cc/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [fastgit.cc] 提供'], + //['https://fastgit.cc/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [fastgit.cc] 提供'], // 挂了 ['https://github.tbedu.top/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [github.tbedu.top] 提供'], - //['https://github.geekery.cn/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [github.geekery.cn] 提供'], // 下载认证信息 用户名:123123 密 码:123123 - ['https://firewall.lxstd.org/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [firewall.lxstd.org] 提供'], + ['https://github.geekery.cn/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [github.geekery.cn] 提供'], ['https://github.ednovas.xyz/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [github.ednovas.xyz] 提供'], ['https://ghfile.geekertao.top/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [ghfile.geekertao.top] 提供'], - ['https://ghp.keleyaa.com/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [ghp.keleyaa.com] 提供'], // Error 1027 - //['https://github.wuzhij.com/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [github.wuzhij.com] 提供'], // 404 + ['https://ghp.keleyaa.com/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [ghp.keleyaa.com] 提供'], ['https://gh.chjina.com/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh.chjina.com] 提供'], ['https://ghpxy.hwinzniej.top/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [ghpxy.hwinzniej.top] 提供'], ['https://cdn.crashmc.com/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [cdn.crashmc.com] 提供'], @@ -76,104 +58,62 @@ ['https://gitproxy.mrhjx.cn/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gitproxy.mrhjx.cn] 提供'], ['https://ghproxy.cxkpro.top/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [ghproxy.cxkpro.top] 提供'], ['https://gh.xxooo.cf/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh.xxooo.cf] 提供'], - ['https://github.limoruirui.com/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [github.limoruirui.com] 提供'], - ['https://gh.idayer.com/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh.idayer.com] 提供'], // Error 1027 - //['https://gh.zwnes.xyz/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh.zwnes.xyz] 提供'], // 超时 - ['https://gh.llkk.cc/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh.llkk.cc] 提供'], + ['https://gh.idayer.com/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh.idayer.com] 提供'], ['https://down.npee.cn/?https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [npee社区] 提供'], ['https://raw.ihtw.moe/github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [raw.ihtw.moe] 提供'], ['https://xget.xi-xu.me/gh', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [github.com/xixu-me/Xget] 提供'], - ['https://dgithub.xyz', '美国', '[美国 西雅图] - 该公益加速源由 [dgithub.xyz] 提供'], - //['https://gh-proxy.ygxz.in/https://github.com', '美国', '[美国 洛杉矶] - 该公益加速源由 [@一个小站 www.ygxz.in] 提供'], // 被蔷 - ['https://gh.nxnow.top/https://github.com', '美国', '[美国 洛杉矶] - 该公益加速源由 [gh.nxnow.top] 提供'], ['https://gh.zwy.one/https://github.com', '美国', '[美国 洛杉矶] - 该公益加速源由 [gh.zwy.one] 提供'], ['https://ghproxy.monkeyray.net/https://github.com', '美国', '[美国 洛杉矶] - 该公益加速源由 [ghproxy.monkeyray.net] 提供'], - ['https://gh.xx9527.cn/https://github.com', '美国', '[美国 洛杉矶] - 该公益加速源由 [gh.xx9527.cn] 提供'], //], download_url = [ // 为了缓解非美国公益节点压力(考虑到很多人无视前面随机的美国节点),干脆也将其加入随机 - //['https://ghproxy.net/https://github.com', '英国', '[英国伦敦] - 该公益加速源由 [ghproxy.net] 提供 提示:希望大家尽量多使用美国节点(每次随机 负载均衡), 避免流量都集中到亚洲公益节点,减少成本压力,公益才能更持久~'], // 挂了 + ['https://ghproxy.net/https://github.com', '其他', '[英国伦敦] - 该公益加速源由 [ghproxy.net] 提供 提示:希望大家尽量多使用美国节点(每次随机 负载均衡), 避免流量都集中到亚洲公益节点,减少成本压力,公益才能更持久~'], ['https://ghfast.top/https://github.com', '其他', '[日本、韩国、新加坡、美国、德国等](CDN 不固定) - 该公益加速源由 [ghproxy.link] 提供 提示:希望大家尽量多使用美国节点(每次随机 负载均衡), 避免流量都集中到亚洲公益节点,减少成本压力,公益才能更持久~'], ['https://wget.la/https://github.com', '其他', '[中国香港、中国台湾、日本、美国等](CDN 不固定) - 该公益加速源由 [ucdn.me] 提供 提示:希望大家尽量多使用美国节点(每次随机 负载均衡), 避免流量都集中到亚洲公益节点,减少成本压力,公益才能更持久~'], //['https://hub.glowp.xyz/https://github.com', '其他', '[中国香港] - 该公益加速源由 [hub.glowp.xyz] 提供 提示:希望大家尽量多使用美国节点(每次随机 负载均衡), 避免流量都集中到亚洲公益节点,减少成本压力,公益才能更持久~'], - //['https://kkgithub.com', '其他', '[中国香港、日本、韩国、新加坡等] - 该公益加速源由 [help.kkgithub.com] 提供 提示:希望大家尽量多使用美国节点(每次随机 负载均衡), 避免流量都集中到亚洲公益节点,减少成本压力,公益才能更持久~'], // 404 ], clone_url = [ ['https://gitclone.com', '国内', '[中国 国内] - 该公益加速源由 [GitClone] 提供 - 缓存:有 - 首次比较慢,缓存后较快'], - ['https://kkgithub.com', '香港', '[中国香港、日本、新加坡等] - 该公益加速源由 [help.kkgithub.com] 提供'], //['https://gitdl.cn/https://github.com', '香港', '[中国香港] - 该公益加速源由 [gitdl] 提供'], // 输出文件错误 //['https://gitproxy.click/https://github.com', '香港', '[中国 香港] - 该公益加速源由 [gitproxy.click] 提供'], //['https://cdn.moran233.xyz/https://github.com', '香港', '[中国 香港] - 该公益加速源由 [cdn.moran233.xyz] 提供'], //['https://hub.glowp.xyz/https://github.com', '香港', '[中国香港] - 该公益加速源由 [hub.glowp.xyz] 提供'], ['https://wget.la/https://github.com', '香港', '[中国香港、中国台湾、日本、美国等](CDN 不固定) - 该公益加速源由 [ucdn.me] 提供'], - ['https://hk.gh-proxy.com/https://github.com', '香港', '[中国香港] - 该公益加速源由 [gh-proxy.com] 提供'], + ['https://hk.gh-proxy.org/https://github.com', '香港', '[中国香港] - 该公益加速源由 [gh-proxy.com] 提供'], ['https://ghfast.top/https://github.com', '韩国', '[日本、韩国、新加坡、美国、德国等](CDN 不固定) - 该公益加速源由 [ghproxy] 提供'], //['https://gh.catmak.name/https://raw.githubusercontent.com', '韩国', '[韩国 首尔] - 该公益加速源由 [gh.catmak.name] 提供'], ['https://githubfast.com', '韩国', '[韩国] - 该公益加速源由 [Github Fast] 提供'], //['https://ghproxy.net/https://github.com', '日本', '[日本 大阪] - 该公益加速源由 [ghproxy.net] 提供'], // 挂了 //['https://proxy.yaoyaoling.net/https://github.com', '日本', '[日本 东京] - 该公益加速源由 [proxy.yaoyaoling.net] 提供'], //['https://g.blfrp.cn/https://github.com', '日本', '[日本 东京] - 该公益加速源由 [g.blfrp.cn] 提供'], - //['https://github.3x25.com/https://github.com', '新加坡', '[新加坡] - 该公益加速源由 [github.3x25.com] 提供'], + //['https://raw.bgithub.xyz', '荷兰', '[荷兰] - 该公益加速源由 [bgithub.xyz] 提供 - 缓存:有'], //['https://ghproxy.1888866.xyz/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [WJQSERVER-STUDIO/ghproxy] 提供'], - //['https://github.moeyy.xyz/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [moeyy.cn] 提供'], // 墙了 - //['https://gh-proxy.net/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh-proxy.net] 提供'], - //['https://github.yongyong.online/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [github.yongyong.online] 提供'], - //['https://ghdd.862510.xyz/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [ghdd.862510.xyz] 提供'], - //['https://hub.gitmirror.com/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [GitMirror] 提供'], - //['https://gh-proxy.com/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh-proxy.com] 提供'], - //['https://ghproxy.cfd/https://github.com', '美国', '[美国 洛杉矶] - 该公益加速源由 [@yionchilau] 提供'], - //['https://github.site', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@yionchilau] 提供'], // 挂了 - //['https://github.store', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@yionchilau] 提供'], // 挂了 - //['https://gh.jiasu.in/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@0-RTT] 提供'], // 404 - //['https://github.boki.moe/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [blog.boki.moe] 提供'], - //['https://raw.ihtw.moe/github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [raw.ihtw.moe] 提供'], - //['https://xget.xi-xu.me/gh', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [github.com/xixu-me/Xget] 提供'], - //['https://dgithub.xyz', '美国', '[美国 西雅图] - 该公益加速源由 [dgithub.xyz] 提供'], - //['https://gh-proxy.ygxz.in/https://github.com', '美国', '[美国 洛杉矶] - 该公益加速源由 [@一个小站 www.ygxz.in] 提供'], // 被蔷 - //['https://hub.scholar.rr.nu', '美国', '[美国 纽约] - 该公益加速源由 [FastGit 群组成员] 提供'], // 证书到期 + //['https://rapidgit.jjda.de5.net/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [热心网友] 提供'], + //['https://gh-proxy.org/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh-proxy.com] 提供'], + //['https://cdn.gh-proxy.org/https://github.com', '其他', '[Fastly CDN] - 该公益加速源由 [gh-proxy.com] 提供'], + //['https://edgeone.gh-proxy.org/https://github.com', '其他', '[edgeone] - 该公益加速源由 [gh-proxy.com] 提供'], + //['https://ghproxy.it/https://github.com', '美国', '[美国 洛杉矶] - 该公益加速源由 [@yionchilau] 提供'], ], clone_ssh_url = [ ['ssh://git@ssh.github.com:443/', 'Github 原生', '[日本、新加坡等] - Github 官方提供的 443 端口的 SSH(依然是 SSH 协议),适用于限制访问 22 端口的网络环境'], //['git@ssh.fastgit.org:', '香港', '[中国 香港] - 该公益加速源由 [FastGit] 提供'], // 挂了 //['git@git.zhlh6.cn:', '美国', '[美国 洛杉矶]'] // 挂了 ], raw_url = [ ['https://raw.githubusercontent.com', 'Github 原生', '[日本 东京] - 缓存:无(或很短)'], - ['https://raw.kkgithub.com', '香港 1', '[中国香港、日本、新加坡等] - 该公益加速源由 [help.kkgithub.com] 提供 - 缓存:有'], //['https://jsd.proxy.aks.moe/gh', '香港 2', '[中国 香港] - 该公益加速源由 [cdn.akass.cn] 提供'], // 证书错误 - ['https://wget.la/https://raw.githubusercontent.com', '香港 2', '[中国香港、中国台湾、日本、美国等](CDN 不固定) - 该公益加速源由 [ucdn.me] 提供 - 缓存:无(或很短)'], - ['https://hk.gh-proxy.com/https://raw.githubusercontent.com', '香港 3', '[中国香港] - 该公益加速源由 [gh-proxy.com] 提供 - 缓存:有(官方注明 2 小时)'], - ['https://hub.glowp.xyz/https://raw.githubusercontent.com', '香港 4', '[中国香港] - 该公益加速源由 [hub.glowp.xyz] 提供 - 缓存:有'], - //['https://cdn.wget.la/gh', '香港 2', '[中国香港、中国台湾、日本、美国等](CDN 不固定) - 该公益加速源由 [ucdn.me] 提供 - 缓存:无(或很短)'], + ['https://wget.la/https://raw.githubusercontent.com', '香港 1', '[中国香港、中国台湾、日本、美国等](CDN 不固定) - 该公益加速源由 [ucdn.me] 提供 - 缓存:无(或很短)'], + ['https://hk.gh-proxy.org/https://raw.githubusercontent.com', '香港 2', '[中国香港] - 该公益加速源由 [gh-proxy.com] 提供 - 缓存:有(官方注明 2 小时)'], + ['https://hub.glowp.xyz/https://raw.githubusercontent.com', '香港 3', '[中国香港] - 该公益加速源由 [hub.glowp.xyz] 提供 - 缓存:有'], //['https://gitproxy.click/https://raw.githubusercontent.com', '香港', '[中国 香港] - 该公益加速源由 [gitproxy.click] 提供'], // 输出错误 //['https://cdn.moran233.xyz/https://raw.githubusercontent.com', '香港', '[中国 香港] - 该公益加速源由 [cdn.moran233.xyz] 提供'], // 404 //['https://gitdl.cn/https://raw.githubusercontent.com', '香港 3', '[中国香港] - 该公益加速源由 [gitdl] 提供 - 缓存:有'], // 输出文件错误 ['https://ghfast.top/https://raw.githubusercontent.com', '韩国', '[日本、韩国、新加坡、美国、德国等](CDN 不固定) - 该公益加速源由 [ghproxy.link] 提供 - 缓存:无(或很短)'], ['https://gh.catmak.name/https://raw.githubusercontent.com', '韩国', '[韩国 首尔] - 该公益加速源由 [gh.catmak.name] 提供'], //['https://ghproxy.net/https://raw.githubusercontent.com', '日本 1', '[日本 大阪] - 该公益加速源由 [ghproxy.net] 提供 - 缓存:有(约 10 分钟)'], // 挂了 - ['https://fastly.jsdelivr.net/gh', '日本 2', '[日本 东京] - 该公益加速源由 [JSDelivr CDN] 提供 - 缓存:有 - 不支持大小超过 50 MB 的文件 - 不支持版本号格式的分支名(如 v1.2.3)'], + ['https://fastly.jsdelivr.net/gh', '日本 1', '[日本 东京] - 该公益加速源由 [JSDelivr CDN] 提供 - 缓存:有 - 不支持大小超过 50 MB 的文件 - 不支持版本号格式的分支名(如 v1.2.3)'], + ['https://cdn.gh-proxy.org/https://raw.githubusercontent.com', '日本 2', '[Fastly CDN] - 该公益加速源由 [gh-proxy.com] 提供 - 缓存:有'], //['https://jsdelivr.pai233.top/gh', '日本 3', '[日本 东京](Vercel Anycast) - 该公益加速源由 [blog.pai233.top] 提供 - 缓存:有'], // This deployment is temporarily paused //['https://proxy.yaoyaoling.net/https://raw.githubusercontent.com', '日本', '[日本 东京] - 该公益加速源由 [proxy.yaoyaoling.net] 提供'], // 空白 ['https://g.blfrp.cn/https://raw.githubusercontent.com', '日本 3', '[日本 东京] - 该公益加速源由 [g.blfrp.cn] 提供'], - ['https://github.3x25.com/https://raw.githubusercontent.com', '新加坡', '[新加坡] - 该公益加速源由 [github.3x25.com] 提供'], + //['https://raw.bgithub.xyz', '荷兰', '[荷兰] - 该公益加速源由 [bgithub.xyz] 提供 - 缓存:有'], //['https://gcore.jsdelivr.net/gh', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [JSDelivr CDN] 提供 - 缓存:有 - 不支持大小超过 50 MB 的文件 - 不支持版本号格式的分支名(如 v1.2.3)'], // 变成 美国 Cloudflare CDN 了 //['https://jsdelivr.b-cdn.net/gh', '其他', '[中国香港、中国台湾、日本、新加坡等](CDN 不固定) - 该公益加速源由 [@rttwyjz] 提供 - 缓存:有'], // 疑似 SNI 阻断 - //['https://xget.xi-xu.me/gh', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [github.com/xixu-me/Xget] 提供'], - //['https://ghproxy.1888866.xyz/https://raw.githubusercontent.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [WJQSERVER-STUDIO/ghproxy] 提供'], - //['https://github.moeyy.xyz/https://raw.githubusercontent.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [moeyy.cn] 提供 - 缓存:有(约 10 分钟)'], // 墙了 - //['https://gh-proxy.net/https://raw.githubusercontent.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh-proxy.net] 提供'], - //['https://github.yongyong.online/https://raw.githubusercontent.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [github.yongyong.online] 提供'], - //['https://ghdd.862510.xyz/https://raw.githubusercontent.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [ghdd.862510.xyz] 提供'], - //['https://raw.cachefly.998111.xyz', '其他 4', '[新加坡、日本、印度等](Anycast CDN 不固定) - 该公益加速源由 [@XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX0] 提供 - 缓存:有(约 12 小时)'], // 证书到期 - //['https://ghproxy.cfd/https://raw.githubusercontent.com', '美国', '[美国 洛杉矶] - 该公益加速源由 [@yionchilau] 提供 - 缓存:无(或很短)'], - //['https://raw.github.site', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@yionchilau] 提供 - 缓存:无(或很短)'], // 挂了 - //['https://raw.github.store', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@yionchilau] 提供 - 缓存:无(或很短)'], // 挂了 - //['https://gh.jiasu.in/https://raw.githubusercontent.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@0-RTT] 提供'], // 404 - //['https://github.boki.moe/https://raw.githubusercontent.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [blog.boki.moe] 提供 - 缓存:无(或很短)'], - //['https://gh-proxy.com/https://raw.githubusercontent.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [gh-proxy.com] 提供 - 缓存:有'], - //['https://cdn.githubraw.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [githubraw.com] 提供 - 缓存:有(几乎永久)'], - //['https://raw.dgithub.xyz', '美国', '[美国 西雅图] - 该公益加速源由 [dgithub.xyz] 提供 - 缓存:无(或很短)'], - //['https://gh-proxy.ygxz.in//https://raw.githubusercontent.com', '美国', '[美国 洛杉矶] - 该公益加速源由 [@一个小站 www.ygxz.in] 提供 - 缓存:无(或很短)'], // 被蔷 - //['https://raw.nuaa.cf', '美国', '[美国 洛杉矶] - 该公益加速源由 [FastGit 群组成员] 提供'], // 证书到期 - //['https://raw.yzuu.cf', '美国', '[美国 纽约] - 该公益加速源由 [FastGit 群组成员] 提供'], // 证书到期 - //['https://hub.gitmirror.com/raw.githubusercontent.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [GitMirror] 提供 - 缓存:无(或很短)'], - //['https://jsdelivr-cdn.pencilnavrp.990989.xyz/gh', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [PencilNavigator] 提供 - 缓存:有'], - //['https://git.yumenaka.net/https://raw.githubusercontent.com', '美国', '[美国 圣何塞]'], // 连接超时 ], svg = [ '' ], style = ['padding:0 6px; margin-right: -1px; border-radius: 2px; background-color: var(--XIU2-background-color); border-color: var(--borderColor-default); font-size: 11px; color: var(--XIU2-font-color);']; @@ -254,10 +194,11 @@ for (const target of mutation.addedNodes) { if (target.nodeType !== 1) return if (target.tagName === 'DIV' && target.parentElement && target.parentElement.id === '__primerPortalRoot__') { - addDownloadZIP(target); addGitClone(target); addGitCloneSSH(target); - } else if (target.tagName === 'DIV' && target.className.indexOf('Box-sc-') != -1) { + addDownloadZIP(target); + //setTimeout(()=>{addDownloadZIP(target)}, 300); + } else if (target.tagName === 'DIV' && target.className.indexOf('LocalTab-module__') != -1) { if (target.querySelector('input[value^="https:"]')) { addGitCloneClear('.XIU2-GCS'); addGitClone(target); } else if (target.querySelector('input[value^="git@"]')) { @@ -315,11 +256,14 @@ // Download ZIP function addDownloadZIP(target) { - let html = target.querySelector('ul[class^=prc-ActionList-ActionList-]>li:last-child');if (!html) return - let href_script = document.querySelector('react-partial[partial-name=repos-overview]>script[data-target="react-partial.embeddedData"]'), - href_slice = href_script.textContent.slice(href_script.textContent.indexOf('"zipballUrl":"')+14), - href = href_slice.slice(0, href_slice.indexOf('"')), - url = '', _html = '', new_download_url = get_New_download_url(); + const html = target.querySelector('ul[class^=prc-ActionList-ActionList-]>li:last-child');if (!html) return + let href = html.querySelector('a[href^="/"][href$=".zip"]');if (!href || !href.getAttribute('href')) return + href = href.getAttribute('href'); + //const href_script = document.querySelector('react-partial[partial-name=repos-overview]>script[data-target="react-partial.embeddedData"]');if (!href_script) return + //const href = JSON.parse(href_script.textContent).props.initialPayload.overview.codeButton.local.platformInfo.zipballUrl + /*let href_slice = href_script.textContent.slice(href_script.textContent.indexOf('"zipballUrl":"')+14), + href = href_slice.slice(0, href_slice.indexOf('"')),*/ + let url = '', _html = '', new_download_url = get_New_download_url(); // 克隆原 Download ZIP 元素,并定位 标签 let html_clone = html.cloneNode(true), @@ -356,8 +300,8 @@ html_parent = '
', url = '', _html = '', _gitClone = ''; if (html.nextElementSibling) html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了) - if (html.parentElement.nextElementSibling.tagName === 'SPAN'){ - html.parentElement.nextElementSibling.textContent += ' (↑点击上面文字可复制)' + if (html.parentElement.nextElementSibling.tagName === 'P'){ + html.parentElement.nextElementSibling.textContent += ' (↑点击文字自动复制)' } if (GM_getValue('menu_gitClone')) {_gitClone='git clone '; html.value = _gitClone + html.value; html.setAttribute('value', html.value);} // 克隆原 Git Clone 元素 @@ -387,8 +331,8 @@ html_parent = '
', url = '', _html = '', _gitClone = ''; html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了) - if (html.parentElement.nextElementSibling.tagName === 'SPAN'){ - html.parentElement.nextElementSibling.textContent += ' (↑点击文字可复制)' + if (html.parentElement.nextElementSibling.tagName === 'P'){ + html.parentElement.nextElementSibling.textContent += ' (↑点击自动复制)' } if (GM_getValue('menu_gitClone')) {_gitClone='git clone '; html.value = _gitClone + html.value; html.setAttribute('value', html.value);} // 克隆原 Git Clone SSH 元素 @@ -561,4 +505,4 @@ window.dispatchEvent(new Event('urlchange')) }); } -})(); +})(); \ No newline at end of file diff --git a/HTML5Volume.user.js b/HTML5Volume.user.js index 6bcc4388e..1938bca0f 100644 --- a/HTML5Volume.user.js +++ b/HTML5Volume.user.js @@ -3,7 +3,7 @@ // @name:zh-CN HTML5 视频音频默认音量 // @name:zh-TW HTML5 視訊音訊預設音量 // @name:ru Громкость аудио-видео в формате HTML5 по умолчанию -// @version 1.0.3 +// @version 1.0.5 // @author X.I.U // @description Avoid being startled by some video/audio with default 100% volume! And support each website to remember the volume separately... // @description:zh-CN 避免被一些默认 100% 音量的视频/音频吓一跳(或社死)!且支持各网站分别记住音量... @@ -34,12 +34,58 @@ let nowVolume = ' (跟随全局)' if (localStorage.getItem('html5_xiu_currentVolume')) nowVolume = ' [ ' + parseInt(localStorage.getItem('html5_xiu_currentVolume')) + '% ]' menu_ID[1] = GM_registerMenuCommand('🔁 忘记当前网站音量' + nowVolume, function(){resetCurrentVolume()}); - menu_ID[2] = GM_registerMenuCommand('💬 反馈 & 建议', function () {GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true}); GM_openInTab('https://greasyfork.org/zh-CN/scripts/438400/feedback', {active: true,insert: true,setParent: true});}); + // 强制当前网站使用全局音量(针对部分不支持调节音量的网站) + if (menu_forcedToEnable('check')) { // 当前网站是否已存在强制列表中 + menu_ID[2] = GM_registerMenuCommand('✅ 已强制当前网站使用全局音量 (针对不支持调节音量的)', function(){menu_forcedToEnable('del')}); + menu_ID[4] = GM_registerMenuCommand('#️⃣ 修改当前网站默认音量 (针对不支持调节音量的)', function(){customCurrentDefaultVolume()}); + } else { + menu_ID[2] = GM_registerMenuCommand('❌ 未强制当前网站使用全局音量 (针对不支持调节音量的)', function(){menu_forcedToEnable('add')}); + } + menu_ID[3] = GM_registerMenuCommand('💬 反馈 & 建议', function () {GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true}); GM_openInTab('https://greasyfork.org/zh-CN/scripts/438400/feedback', {active: true,insert: true,setParent: true});}); } insPage(); currentPage(); + // 强制当前网站使用全局音量(针对部分不支持调节音量的网站) + function menu_forcedToEnable(type) { + switch(type) { + case 'check': + if(check()) return true + return false + break; + case 'add': + add(); + break; + case 'del': + del(); + break; + } + + function check() { // 存在返回真,不存在返回假 + let websiteList = GM_getValue('menu_forcedToEnable',[]); // 读取网站列表 + if (websiteList.indexOf(location.host) === -1) return false // 不存在返回假 + return true + } + + function add() { + if (check()) return + let websiteList = GM_getValue('menu_forcedToEnable',[]); // 读取网站列表 + websiteList.push(location.host); // 追加网站域名 + GM_setValue('menu_forcedToEnable', websiteList); // 写入配置 + location.reload(); // 刷新网页 + } + + function del() { + if (!check()) return + let websiteList = GM_getValue('menu_forcedToEnable',[]), // 读取网站列表 + index = websiteList.indexOf(location.host); + websiteList.splice(index, 1); // 删除网站域名 + GM_setValue('menu_forcedToEnable', websiteList); // 写入配置 + location.reload(); // 刷新网页 + } + } + // 网页本身的 Video Audio 标签 function currentPage() { @@ -88,12 +134,16 @@ // 判断该视频/音频元素是否已监听事件 function isFirstEvent(target) { - if (!target.controls) return; // 如果视频/音频已经有了自己的控件(即没有使用 HTML5 默认的控件),则退出 + if (!menu_forcedToEnable('check')) { // 如果未强制当前网站使用全局音量(针对部分不支持调节音量的网站) + if (!target.controls) return; // 如果视频/音频已经有了自己的控件(即没有使用 HTML5 默认的控件),则退出 + } modifyVolume(target); - // 如果没有该属性,则代表是还未监听事件 - if (target.dataset.html5VolumeXiu != 'true') { - target.dataset.html5VolumeXiu = 'true' - target.addEventListener('volumechange', volumeChangeEvent); + if (!menu_forcedToEnable('check')) { // 如果未强制当前网站使用全局音量(针对部分不支持调节音量的网站),毕竟不支持音量调节的网站监听音量变化是没有意义的,反而可能会被网站默认静音什么的搞乱 + // 如果没有该属性,则代表是还未监听事件 + if (target.dataset.html5VolumeXiu != 'true') { + target.dataset.html5VolumeXiu = 'true' + target.addEventListener('volumechange', volumeChangeEvent); + } } } @@ -111,8 +161,18 @@ // 修改全局默认音量 function customDefaultVolume() { - let newValue = parseFloat(prompt('修改全局默认音量,不影响各网站记住的音量,当前网页需刷新后生效~\n范围:0~100 (即 0%~100%,不需要加 % 百分号)\n默认:30', GM_getValue('menu_defaultVolume', 30))); + let newValue = parseFloat(prompt('修改全局默认音量,不影响各网站记住的音量,修改后当前网页立即生效~\n范围:0~100 (即 0%~100%,不需要加 % 百分号)\n默认:30', GM_getValue('menu_defaultVolume', 30))); if (!Number.isNaN(newValue) && newValue >= 0 && newValue <= 100) {GM_setValue('menu_defaultVolume', newValue);} + currentPage(); // 重置当前网页的音量 + registerMenuCommand(); // 重新注册菜单(刷新菜单上的音量值) + } + + + // 修改当前网站默认音量 (针对不支持调节音量的网站) + function customCurrentDefaultVolume() { + let newValue = parseFloat(prompt('修改当前网站默认音量 (针对不支持调节音量的网站),修改后立即生效~\n范围:0~100 (即 0%~100%,不需要加 % 百分号)\n默认:全局默认音量', localStorage.getItem('html5_xiu_currentVolume') || GM_getValue('menu_defaultVolume', 30))); + if (!Number.isNaN(newValue) && newValue >= 0 && newValue <= 100) {localStorage.setItem('html5_xiu_currentVolume', newValue);} + currentPage(); // 重置当前网页的音量 registerMenuCommand(); // 重新注册菜单(刷新菜单上的音量值) } @@ -121,5 +181,6 @@ function resetCurrentVolume() { if (localStorage.getItem('html5_xiu_currentVolume')) localStorage.removeItem('html5_xiu_currentVolume') // 清理 localStorage currentPage(); // 重置当前网页的音量 + registerMenuCommand(); // 重新注册菜单(刷新菜单上的音量值) } })(); diff --git a/Lanzou-Enhanced.user.js b/Lanzou-Enhanced.user.js index 9110e38c8..ed8e63cd4 100644 --- a/Lanzou-Enhanced.user.js +++ b/Lanzou-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 蓝奏云网盘增强 -// @version 1.5.7 +// @version 1.5.8 // @author X.I.U // @description 文件排序、刷新不回根目录、快捷返回上一级(右键网页空白处)、后退返回上一级、右键文件显示菜单、点击直接下载文件、点击空白进入目录、自动显示更多文件、一键复制所有分享链接、自定义分享链接域名、自动打开/复制分享链接、带密码的分享链接自动输密码、拖入文件自动显示上传框、输入密码后回车确认、优化编辑框初始大小 // @match *://lanzou.com/u @@ -52,6 +52,7 @@ // @match *://*.lanzj.com/* // @match *://*.lanzl.com/* // @match *://*.lanzm.com/* +// @match *://*.lanzn.com/* // @match *://*.lanzo.com/* // @match *://*.lanzp.com/* // @match *://*.lanzq.com/* diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index de1b206c7..584671e36 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎美化 -// @version 1.5.19 +// @version 1.5.20 // @author X.I.U // @description 宽屏显示、暗黑模式(4种)、暗黑模式跟随浏览器、屏蔽首页活动广告、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏 // @match *://www.zhihu.com/* @@ -293,6 +293,9 @@ html[data-theme=dark] .LinkCard-backdrop {background-image: url() !important;} html[data-theme=dark] .Avatar, html[data-theme=dark] .UserAvatar {background-color: #2d333b !important;} html[data-theme=dark] .UserAvatar {border: 4px solid #2d333b !important;} +/* 划词提示文字和背景颜色 */ +html[data-theme=dark] .css-fg13ww {color: #adbac7 !important; background-color: #363d47 !important; border-radius: 10px !important;} + /* 通知信息中点评论链接时,在弹出的评论框中 "高亮" 目标评论 */ html[data-theme=dark] .CommentItemV2[tabindex='-1'] {background-color: #343a44 !important;} diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index f33be9ca2..222676ddb 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -3,11 +3,11 @@ // @name:zh-CN 知乎增强 // @name:zh-TW 知乎增強 // @name:ru Улучшение Zhihu -// @version 2.3.25 +// @version 2.3.29 // @author X.I.U // @description A more personalized Zhihu experience~ -// @description:zh-CN 移除登录弹窗、屏蔽指定类别(视频、盐选、文章、想法、关注[赞同/关注了XX]等)、屏蔽低赞/低评回答、屏蔽用户、屏蔽关键词、默认收起回答、快捷收起回答/评论(左键两侧)、快捷回到顶部(右键两侧)、区分问题文章、移除高亮链接、净化搜索热门、净化标题消息、展开问题描述、显示问题作者、默认高清原图(无水印)、置顶显示时间、完整问题时间、直达问题按钮、默认站外直链... -// @description:zh-TW 移除登錄彈窗、屏蔽指定類別(視頻、鹽選、文章、想法、關注[贊同/關注了XX]等)、屏蔽低贊/低評回答、屏蔽用戶、屏蔽關鍵詞、默認收起回答、快捷收起回答/評論、快捷回到頂部、區分問題文章、移除高亮鏈接、默認高清原圖(無水印)、默認站外直鏈... +// @description:zh-CN 移除登录弹窗、屏蔽指定类别(视频、盐选、文章、想法、关注[赞同/关注了XX]等)、屏蔽低赞/低评、屏蔽用户、屏蔽关键词、默认收起回答、快捷收起回答/评论(左键两侧)、快捷回到顶部(右键两侧)、区分问题文章、移除高亮链接、净化搜索热门、净化标题消息、展开问题描述、显示问题作者、默认高清原图(无水印)、置顶显示时间、完整问题时间、直达问题按钮、默认站外直链... +// @description:zh-TW 移除登錄彈窗、屏蔽指定類別(視頻、鹽選、文章、想法、關注[贊同/關注了XX]等)、屏蔽低贊/低評、屏蔽用戶、屏蔽關鍵詞、默認收起回答、快捷收起回答/評論、快捷回到頂部、區分問題文章、移除高亮鏈接、默認高清原圖(無水印)、默認站外直鏈... // @description:ru Более персонализированный опыт пользования сайтом Zhihu~ // @match *://www.zhihu.com/* // @match *://zhuanlan.zhihu.com/* @@ -36,7 +36,7 @@ var menu_ALL = [ ['menu_collapsedAnswer', '一键收起回答/评论', '一键收起回答/评论', true], ['menu_collapsedNowAnswer', '快捷收起回答/评论 (点击两侧空白处)', '快捷收起回答/评论', true], ['menu_backToTop', '快捷回到顶部 (右键两侧空白处)', '快捷回到顶部', true], - ['menu_blockLowCount', '屏蔽低赞低评', '设置要屏蔽 低于多少赞同/评价 的回答(默认不需要留空即可)
(例如设置 0 则无人赞同/评价的回答会被屏蔽
(例如设置 20 则赞同/评价数量低于 20 的回答会被屏蔽
(修改后,后续加载的回答会立即生效,但不影响当前网页已有内容', ''], + ['menu_blockLowCount', '屏蔽低赞低评', '设置要屏蔽 低于多少赞同/评价 的回答/文章(默认不需要留空即可)
(例如设置 0 则无人赞同/评价的回答/文章会被屏蔽
(例如设置 20 则赞同/评价数量低于 20 的回答/文章会被屏蔽
(修改后,后续加载的回答/文章会立即生效,但不影响当前网页已有内容', ''], ['menu_blockLowUpvoteCount', '最低赞同数 [首页]', '最低赞同数(首页)', ''], ['menu_blockLowCommentCount', '最低评价数 [首页]', '最低评价数(首页)', ''], ['menu_blockLowUpvoteCountQuestion', '最低赞同数 [问题页]', '最低赞同数(问题页)', ''], @@ -48,6 +48,7 @@ var menu_ALL = [ ['menu_blockKeywords', '屏蔽指定关键词', '屏蔽指定关键词', true], ['menu_blockKeywordsComment', '屏蔽关键词 - 评论区', '屏蔽关键词 - 评论区', true], ['menu_customBlockKeywords', '自定义屏蔽关键词', '自定义屏蔽关键词', []], + ['menu_addSelectedBlockKeywords', '添加选中文字到屏蔽词 ↑', '添加选中文字到屏蔽词', []], ['menu_blockType', '屏蔽指定类别 (视频/文章等)', '勾选 = 屏蔽该类别的信息流', ''], ['menu_blockTypeVideo', '视频 [首页、搜索页、问题页、关注页]', '视频(首页、搜索页、问题页、关注页)', true], ['menu_blockTypeArticle', '文章 [首页、搜索页、关注页]', '文章(首页、搜索页、关注页)', false], @@ -87,10 +88,12 @@ function registerMenuCommand() { //menu_ID[i] = GM_registerMenuCommand(`#️⃣ ${menu_ALL[i][1]}`, function(){customBlockLowCount(menu_ALL[i][0],'设置要屏蔽 低于多少评价 的回答?\n(例如设置 20 则评价数低于 20 的回答会被屏蔽\n(目前该功能适用于 首页信息流、问题页\n(点击 [确定] 修改后,后续加载的回答会立即生效,不影响当前已有\n(如不需要请留空并直接点击 [确定] 即可')}); } else if (menu_ALL[i][0] === 'menu_customBlockUsers') { // 只有 [屏蔽指定用户] 启用时,才注册菜单 [自定义屏蔽用户] if (menu_value('menu_blockUsers')) menu_ID[i] = GM_registerMenuCommand(`#️⃣ ${menu_ALL[i][1]}`, function(){customBlockUsers()}); - } else if (menu_ALL[i][0] === 'menu_customBlockKeywords') { // 只有 [屏蔽指定关键词] 启用时,才注册菜单 [自定义屏蔽关键词] - if (menu_value('menu_blockKeywords')) menu_ID[i] = GM_registerMenuCommand(`#️⃣ ${menu_ALL[i][1]}`, function(){customBlockKeywords()}); } else if (menu_ALL[i][0] === 'menu_blockKeywordsComment') { // 只有 [屏蔽指定关键词] 启用时,才注册菜单 [屏蔽关键词 - 评论区] if (menu_value('menu_blockKeywords')) menu_ID[i] = GM_registerMenuCommand(`${menu_ALL[i][3]?'✅':'❌'} ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)}); + } else if (menu_ALL[i][0] === 'menu_customBlockKeywords') { // 只有 [屏蔽指定关键词] 启用时,才注册菜单 [自定义屏蔽关键词] + if (menu_value('menu_blockKeywords')) menu_ID[i] = GM_registerMenuCommand(`#️⃣ ${menu_ALL[i][1]}`, function(){customBlockKeywords()}); + } else if (menu_ALL[i][0] === 'menu_addSelectedBlockKeywords') { // 只有 [屏蔽指定关键词] 启用时,才注册菜单 [添加选中文字到屏蔽词] + if (menu_value('menu_blockKeywords')) menu_ID[i] = GM_registerMenuCommand(`#️⃣ ${menu_ALL[i][1]}`, function(){addSelectedKeywordToBlocklist()}); } else if (menu_ALL[i][0] === 'menu_blockType') { // 屏蔽指定类别 使用单独的设置界面 menu_ID[i] = GM_registerMenuCommand(`#️⃣ ${menu_ALL[i][1]}`, function(){menu_setting('checkbox', menu_ALL[i][1], menu_ALL[i][2], true, [menu_ALL[i+1], menu_ALL[i+2], menu_ALL[i+3], menu_ALL[i+4], menu_ALL[i+5], menu_ALL[i+6], menu_ALL[i+7], menu_ALL[i+8], menu_ALL[i+9]])}); } else if (menu_ALL[i][0].indexOf('menu_blockType') == -1 && menu_ALL[i][0] != 'menu_blockYanXuan' && menu_ALL[i][0].indexOf('menu_blockLow') == -1) { // 排除使用单独设置界面的 屏蔽指定类别 项 @@ -445,7 +448,7 @@ function isElementInViewport_(el) { } -// 屏蔽低赞/低评回答 +// 屏蔽低赞/低评回答/文章 function blockLowCount(type) { switch(type) { case 'index': @@ -458,14 +461,16 @@ function blockLowCount(type) { blockLowCount_('.List-item', 'List-item', 'menu_blockLowUpvoteCountQuestion', 'menu_blockLowCommentCountQuestion'); break; } + console.log(type) function blockLowCount_(className1, className2, menuUpvote, menuComment) { // 前几条因为是直接加载的,而不是动态插入网页的,所以需要单独判断 function blockLowCount_now() { document.querySelectorAll(className1).forEach(function(item1){ - blockLowCount_1(item1,menuUpvote,'meta[itemprop=upvoteCount]'); - blockLowCount_1(item1,menuComment,'meta[itemprop=commentCount]'); + console.log(item1) + blockLowCount_1(item1,menuUpvote,'upvote_num'); + blockLowCount_1(item1,menuComment,'comment_num'); }) } @@ -480,8 +485,8 @@ function blockLowCount(type) { for (const target of mutation.addedNodes) { if (target.nodeType != 1) return if (target.className === className2) { - blockLowCount_1(target,menuUpvote,'meta[itemprop=upvoteCount]'); - blockLowCount_1(target,menuComment,'meta[itemprop=commentCount]'); + blockLowCount_1(target,menuUpvote,'upvote_num'); + blockLowCount_1(target,menuComment,'comment_num'); } } } @@ -491,18 +496,17 @@ function blockLowCount(type) { } - function blockLowCount_1(item1, menu, css) { + function blockLowCount_1(item, menu, type) { if (GM_getValue(menu)) { - let item = item1.querySelector(css); - //console.log(item) - if (item && item.content && Number(item.content) < Number(GM_getValue(menu))) { - if (menu.indexOf('Upvote') !== -1) { - console.log('已屏蔽低赞回答:', item.content + '<' + GM_getValue(menu), item1, type); - } else { - console.log('已屏蔽低评回答:', item.content + '<' + GM_getValue(menu), item1, type); + let item_ContentItem = item.querySelector('.ContentItem') + if (item_ContentItem && item_ContentItem.dataset.zaExtraModule) { + let item2 = JSON.parse(item_ContentItem.dataset.zaExtraModule); + //console.log(item2) + if (item2 && item2.card.content && Number(item2.card.content[type]) < Number(GM_getValue(menu))) { + console.log('已屏蔽' + (type === 'upvote_num' ? '低赞':'低评') + (item_ContentItem.classList.contains('AnswerItem') ? '回答':'文章') + ':', item2.card.content[type] + '<' + GM_getValue(menu), item); + item.hidden = true; + item.style.display = 'none'; } - item1.hidden = true; - item1.style.display = 'none'; } } } @@ -840,6 +844,62 @@ function blockUsers(type) { } +// 缓存最近一次选中的文字,避免从右键脚本菜单回调中取不到当前选区 +var selectedTextForBlockKeywords = ''; +// 规范化屏蔽词文本:压缩多余空白并去掉首尾空格 +function normalizeBlockKeywordText(text) { + return (text || '').replace(/\s+/g, ' ').trim(); +} + +// 读取当前选中的文字,兼容输入框和普通页面选区 +function getSelectedBlockKeywordText() { + let text = ''; + const activeElement = document.activeElement; + if (activeElement && ((activeElement.tagName === 'TEXTAREA') || (activeElement.tagName === 'INPUT' && /^(?:text|search|url|tel|password)$/i.test(activeElement.type))) && typeof activeElement.selectionStart === 'number') { + text = activeElement.value.slice(activeElement.selectionStart, activeElement.selectionEnd); + } + if (!text && window.getSelection) { + text = window.getSelection().toString(); + } + return normalizeBlockKeywordText(text); +} + +// 记录最近一次选中的文字,供右键脚本菜单 [添加选中文字到屏蔽词] 使用 +function rememberSelectedBlockKeyword() { + const updateSelectedBlockKeyword = function() { + selectedTextForBlockKeywords = getSelectedBlockKeywordText(); + } + document.addEventListener('selectionchange', updateSelectedBlockKeyword); + document.addEventListener('contextmenu', updateSelectedBlockKeyword, true); + window.addEventListener('urlchange', function(){selectedTextForBlockKeywords = '';}); +} + +// 将当前选中的文字直接加入 [自定义屏蔽关键词] 列表 +function addSelectedKeywordToBlocklist() { + if (!menu_value('menu_blockKeywords')) { + GM_notification({text: '请先开启 [屏蔽指定关键词] 功能~', timeout: 3000}); + return + } + + const keyword = getSelectedBlockKeywordText() || selectedTextForBlockKeywords; + if (!keyword) { + GM_notification({text: '未检测到选中的文字,请先选中内容后再使用该菜单~', timeout: 3000}); + return + } + + let keywords = (GM_getValue('menu_customBlockKeywords') || []).map(function(item){return normalizeBlockKeywordText(item)}).filter(function(item){return item !== ''}); + if (keywords.some(function(item){return item.toLowerCase() === keyword.toLowerCase();})) { + GM_notification({text: `屏蔽词 [${keyword}] 已存在,无需重复添加~`, timeout: 3000}); + return + } + + keywords.push(keyword); + GM_setValue('menu_customBlockKeywords', keywords); + registerMenuCommand(); // 同步刷新缓存的菜单值 + GM_notification({text: `已添加屏蔽词 [${keyword}]\n后续加载的标题/评论会按该关键词过滤~`, timeout: 4000}); +} + + // 自定义屏蔽关键词(标题) function customBlockKeywords() { let nowBlockKeywords = ''; @@ -1593,6 +1653,7 @@ function switchHomeRecommend() { (function() { if (window.onurlchange === undefined) {addUrlChangeEvent();} // Tampermonkey v4.11 版本添加的 onurlchange 事件 grant,可以监控 pjax 等网页的 URL 变化 + rememberSelectedBlockKeyword(); // 记录当前选中的文字,供右键脚本菜单直接加入屏蔽词 removeLogin(); // 移除登录弹窗,Violentmonkey 不能延迟执行这个 cleanTitles(); // 净化标题消息,不能延迟执行 @@ -1624,7 +1685,7 @@ function switchHomeRecommend() { collapsedNowAnswer('.Question-main'); // 收起当前回答 + 快捷返回顶部 questionRichTextMore(); // 展开问题描述 if (location.pathname.indexOf('answer') == -1) { // 问题页而不是回答页 - blockLowCount('question'); // 屏蔽低赞/低评回答 + blockLowCount('question'); // 屏蔽低赞/低评回答/文章 } else { // 将回答页的的查看全部回答选项去掉默认的点击事件改成静态链接,为了避免功能交叉混乱 document.querySelectorAll('div.Card.ViewAll>a').forEach((a)=>{a.outerHTML = a.outerHTML;}) } @@ -1701,14 +1762,14 @@ function switchHomeRecommend() { document.lastElementChild.appendChild(document.createElement('style')).textContent = '.Topstory-container {min-height: 1500px;}'; if (menu_value('menu_blockTypeVideo')) document.lastChild.appendChild(document.createElement('style')).textContent = `.Card .ZVideoItem-video, nav.TopstoryTabs > a[aria-controls="Topstory-zvideo"] {display: none !important;}`; - collapsedNowAnswer('main div'); // 收起当前回答 + 快捷返回顶部 - collapsedNowAnswer('.Topstory-container'); // 收起当前回答 + 快捷返回顶部 + collapsedNowAnswer('.App-main .Topstory'); // 收起当前回答 + 快捷返回顶部 + collapsedNowAnswer('.App-main .Topstory-container'); // 收起当前回答 + 快捷返回顶部 if (location.pathname !== '/column-square'){ // 不是首页 - 专栏时 setInterval(function(){topTime_('.TopstoryItem', 'ContentItem-meta')}, 300); // 置顶显示时间 addTypeTips(); // 区分问题文章 addToQuestion(); // 直达问题按钮 if (location.pathname == '/') { // 推荐 - blockLowCount('index'); // 屏蔽低赞/低评回答 + blockLowCount('index'); // 屏蔽低赞/低评回答/文章 blockUsers('index'); // 屏蔽指定用户 blockKeywords('index'); // 屏蔽指定关键词 blockType(); // 屏蔽指定类别(视频/文章等) @@ -1716,7 +1777,7 @@ function switchHomeRecommend() { blockKeywords('index'); // 屏蔽指定关键词 blockHotOther(); // 屏蔽热榜杂项 } else if (location.pathname == '/follow') { // 关注 - blockLowCount('follow'); // 屏蔽低赞/低评回答 + blockLowCount('follow'); // 屏蔽低赞/低评回答/文章 blockUsers('follow'); // 屏蔽指定用户 blockKeywords('follow'); // 屏蔽指定关键词 blockType(); // 屏蔽指定类别(视频/文章等) @@ -1725,4 +1786,4 @@ function switchHomeRecommend() { } } } -})(); +})(); \ No newline at end of file diff --git a/other/Autopage/rules.json b/other/Autopage/rules.json index 2c52d6d3f..62a1fe04f 100644 --- a/other/Autopage/rules.json +++ b/other/Autopage/rules.json @@ -2,7 +2,7 @@ "百度搜索": { "host": ["www.baidu.com","ipv6.baidu.com"], "url": "fun.isUrlC(); if (fun.isMobile()) {location.hostname = 'm.baidu.com';} else {return (fun.lp() == '/s')}", - "style": ".new-pmd .c-img-border {position: initial !important;} .op-bk-polysemy-video__wrap.c-gap-bottom {display: none !important;}", + "style": ".new-pmd .c-img-border {position: initial !important;} .op-bk-polysemy-video__wrap.c-gap-bottom, #content_left:not([style])>.result-op[tpl='new_baikan_index'], #content_left:not([style])>.result-op[tpl='ai_ask'] {display: none !important;}", "history": true, "pager": { "nextL": "#page strong+a:not(.n)", @@ -189,9 +189,19 @@ "replaceE": "#pagination" } }, + "Yandex 搜索 - 手机版": { + "host": ["ya.ru","yandex.com","yandex.ru","yandex.ua","yandex.by","yandex.kz","yandex.uz","yandex.com.tr"], + "url": "/^\\/search\\/touch\\//", + "pager": { + "type": 2, + "nextL": ".Pager:not(.Pager_progress_yes)>button.Pager-More", + "interval": 1500, + "scrollD": 1000 + } + }, "Yandex 搜索": { - "host": ["yandex.com","yandex.ru","yandex.ua","yandex.by","yandex.kz","yandex.uz","yandex.com.tr"], - "url": "/^\\/search\\//", + "host": ["ya.ru","yandex.com","yandex.ru","yandex.ua","yandex.by","yandex.kz","yandex.uz","yandex.com.tr"], + "url": "/^\\/search/", "history": true, "pager": { "nextL": "a.Pager-Item_type_next,a.pager__item_kind_next", @@ -200,7 +210,7 @@ } }, "Yandex 搜索 - 视频": { - "host": ["yandex.com","yandex.ru","yandex.ua","yandex.by","yandex.kz","yandex.uz","yandex.com.tr"], + "host": ["ya.ru","yandex.com","yandex.ru","yandex.ua","yandex.by","yandex.kz","yandex.uz","yandex.com.tr"], "url": "/^\\/video\\/search/", "hiddenPN": true, "pager": { @@ -299,43 +309,6 @@ "pageE": ".text-result, .image-wrapper" } }, - "百度贴吧 - 搜索页": { - "host": "tieba.baidu.com", - "url": "/^\\/f\\/search\\/res/", - "pager": { - "nextL": "a.next", - "pageE": ".s_post_list > div", - "replaceE": ".pager" - } - }, - "百度贴吧 - 帖子内": { - "host": ["tieba.baidu.com","jump2.bdimg.com"], - "url": "if (location.hostname == 'jump2.bdimg.com') location.hostname = 'tieba.baidu.com'; return (fun.indexOF('/p/')) ", - "iframe": true, - "thread": true, - "style": ".d_sign_split,img.j_user_sign,.d_author .d_pb_icons,.save_face_bg,.save_face_bg_2,li.d_name a.icon_tbworld,.lzl_cnt a.icon_tbworld,.topic_list_box.topic-fixed {display: none !important;} a.p_author_face.j_frame_guide {background: none repeat scroll 0 0 #FFF !important;border: 1px solid #CCC !important;padding: inherit !important;} .red_text,.red-text,.vip_red,.vip-red,.vip_red:hover,.vip-red:hover,.vip_red:visited,.vip-red:visited {color: #2d64b3 !important;}", - "pager": { - "type": 5, - "nextL": "//li[contains(@class,'pb_list_pager')]/a[text()='下一页']", - "style": "ul.tbui_aside_float_bar,.core_title_wrap_bright.tbui_follow_fixed.core_title_absolute_bright {display: none !important;}" - } - }, - "百度贴吧": { - "host": "tieba.baidu.com", - "url": "/^\\/f/", - "style": "img.j_retract {margin-top: 0 !important;margin-bottom: 0 !important;}", - "history": false, - "pager": { - "nextL": "js; if (fun.getCSS('a.next.pagination-item')) return (fun.getCSS('a.next.pagination-item').href + '&pagelets=frs-list%2Fpagelet%2Fthread&pagelets_stamp=' + new Date().getTime())", - "pageE": "//script[contains(text(),'Bigpipe.register(\"frs-list/pagelet/thread_list\", ')]", - "insertP": ["#thread_list",3], - "interval": 2000, - "scrollD": 3000 - }, - "function": { - "bF": "let scriptText = pageE[0].textContent.replace('Bigpipe.register(\"frs-list/pagelet/thread_list\", ',''); scriptText = scriptText.slice(0,scriptText.indexOf(').')); let temp = document.createElement('div'); temp.innerHTML = JSON.parse(scriptText).content; fun.getCSS('#frs_list_pager').innerHTML = fun.getCSS('#frs_list_pager',temp).innerHTML; return fun.src_bF(fun.getAllCSS('#thread_list>li',temp))" - } - }, "豆瓣": { "host": "movie.douban.com", "url": "/^\\/(explore|tv\\/)/", @@ -643,20 +616,11 @@ }, "番组计划": { "host": ["bgm.tv","bangumi.tv","chii.in"], - "url": "return (fun.indexOF(/\\/(browser|subject_search|tag|wish)/) || fun.isPager())", + "url": "return (fun.indexOF(/\\/(browser|subject_search|tag|wish|forum|comments)/) || fun.isPager())", "blank": 3, "pager": { "nextL": "//div[@class='page_inner']/a[text()='››']", - "pageE": "ul#browserItemList>li", - "replaceE": ".page_inner" - } - }, - "番组计划 - 小组帖子列表": { - "host": ["bgm.tv","bangumi.tv","chii.in"], - "url": "/\\/forum/", - "pager": { - "nextL": "//div[@class='page_inner']/a[text()='››']", - "pageE": ".topic_list>tbody:last-of-type>tr.topic", + "pageE": "ul#browserItemList>li,.topic_list>tbody:last-of-type>tr.topic,#comment_box>.item", "replaceE": ".page_inner" } }, @@ -685,6 +649,18 @@ "bF": "o=document.createElement('div'); o.innerHTML=JSON.parse(pageE[0].textContent).comments; fun.getCSS('.pagination').outerHTML = o.querySelector('.pagination').outerHTML; return [].slice.call(o.querySelectorAll('.media:not(.no-btm-border)')).reverse()" } }, + "2Libra": { + "host": "2libra.com", + "url": "fun.isUrlC();if (fun.lp() == '/' || fun.indexOF(/^\\/node\\//) || fun.isPager()){return true;}else if(fun.indexOF(/^\\/post\\//)){rule.pager.pageE='[data-main-left] div.card.border-base-content\\\\/10';rule.thread=true;}else if(fun.indexOF(/^\\/user\\/(.+)\\/(post|comment)/)){rule.pager.type=1;rule.pager.pageE='.bg-base-100>div>ul>li.items-center, [data-main-left] div.card.border-base-content\\\\/10>div:not([class])>div>div.border-base-content\\\\/10';}else{return false;};return true", + "blank": 3, + "history": false, + "pager": { + "type": 6, + "nextL": ".join-item.btn.btn-sm.btn-active+a", + "pageE": "ul.card>li.items-center", + "loadTime": 600 + } + }, "巴哈姆特": { "host": "forum.gamer.com.tw", "url": "/^\\/B\\.php/", @@ -698,6 +674,19 @@ "aF": "Forum.B.lazyThumbnail();Forum.Common.drawNoImageCanvas();" } }, + "巴哈姆特動畫瘋 - list": { + "host": "ani.gamer.com.tw", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": "a.next", + "pageE": ".theme-list-block>a", + "replaceE": ".page_control" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, "懂车帝论坛": { "host": "www.dongchedi.com", "url": "fun.isUrlC(); return (fun.indexOF('/community/'))", @@ -917,6 +906,15 @@ "replaceE": ".pagination" } }, + "TFW2005": { + "host": "www.tfw2005.com", + "url": "if(fun.indexOF(/^\\/boards\\/forums\\//)){rule.blank=3;}else if(fun.indexOF(/^\\/boards\\/threads\\//)){rule.pager.pageE='ol#messageList>li';rule.thread=true;}else{return false;};return true", + "pager": { + "nextL": ".PageNav .currentPage+a[href], .PageNav .currentPage+a+span>span>a:first-child", + "pageE": "ol.discussionListItems>li", + "replaceE": ".PageNav" + } + }, "CPC中文印刷社区": { "host": "www.cnprint.org", "url": "if(fun.indexOF(/^\\/bbs\\/forumdisplay\\.php/)){rule.blank=3;return true;}else if(fun.indexOF(/^\\/bbs\\/showthread\\.php/)){return true;}", @@ -926,6 +924,15 @@ "replaceE": ".pagenav" } }, + "Mobile01 - 论坛": { + "host": "www.mobile01.com", + "url": "if(fun.indexOF(/^\\/topicdetail\\.php/)){rule.thread=true;return true;}else if(fun.indexOF(/^\\/forumtopic\\.php/)){rule.blank=3;return true;}", + "pager": { + "nextL": ".l-pagination__page.is-active+li>a", + "pageE": ".l-listTable__tbody>.l-listTable__tr,.l-articlePage:not(:nth-child(2))", + "replaceE": ".l-pagination" + } + }, "TGFC Lifestyle": { "host": "bbs.tgfcer.com", "url": "return (fun.lp() == '/forumdisplay.php' || fun.indexOF('/forum'))", @@ -977,7 +984,7 @@ } }, "北+": { - "host": ["/^((www|bbs)\\.)?(soul|snow|south|spring|summer|north|white|level|east)-plus\\.(net|org)$/","bbs.imoutolove.me"], + "host": ["/^((www|bbs)\\.)?(soul|snow|south|spring|summer|north|white|level|east|blue)-plus\\.(net|org)$/","bbs.imoutolove.me"], "url": "return (fun.lp() == '/thread.php' || fun.lp() == '/search.php')", "pager": { "nextL": "//div[@class='pages']/ul/li[./b]/following-sibling::li[1][not(@class)]/a[not(text()='»')]", @@ -986,7 +993,7 @@ } }, "北+ - 图墙": { - "host": ["/^((www|bbs)\\.)?(soul|snow|south|spring|summer|north|white|level|east)-plus\\.(net|org)$/","bbs.imoutolove.me"], + "host": ["/^((www|bbs)\\.)?(soul|snow|south|spring|summer|north|white|level|east|blue)-plus\\.(net|org)$/","bbs.imoutolove.me"], "url": "return (fun.lp() == '/thread_new.php')", "style": "img.lazy {display: inline !important;}", "pager": { @@ -999,7 +1006,7 @@ } }, "北+ - 帖子内": { - "host": ["/^((www|bbs)\\.)?(soul|snow|south|spring|summer|north|white|level|east)-plus\\.(net|org)$/","bbs.imoutolove.me"], + "host": ["/^((www|bbs)\\.)?(soul|snow|south|spring|summer|north|white|level|east|blue)-plus\\.(net|org)$/","bbs.imoutolove.me"], "url": "return (fun.lp() == '/read.php')", "thread": true, "pager": { @@ -1009,7 +1016,7 @@ } }, "北+ - 用户页": { - "host": ["/^((www|bbs)\\.)?(soul|snow|south|spring|summer|north|white|level|east)-plus\\.(net|org)$/","bbs.imoutolove.me"], + "host": ["/^((www|bbs)\\.)?(soul|snow|south|spring|summer|north|white|level|east|blue)-plus\\.(net|org)$/","bbs.imoutolove.me"], "url": "return (fun.lp() == '/u.php' && (fun.indexOF('action-topic-','s') || fun.indexOF('action-post-','s')))", "pager": { "nextL": "//div[@class='pages']/ul/li[./b]/following-sibling::li[1][not(@class)]/a[not(text()='»')]", @@ -1184,6 +1191,16 @@ "replaceE": ".pagination:not(#breadcrumb_multipage_popup)" } }, + "kaspersky 论坛": { + "host": "forum.kaspersky.com", + "url": "/^\\/forum\\//", + "blank": 3, + "pager": { + "nextL": ".ipsPagination_next>a", + "pageE": ".ipsDataItem", + "replaceE": "div[data-role=tablePagination]>.ipsPagination" + } + }, "ptt.cc": { "host": "www.ptt.cc", "url": "/^\\/bbs\\/.+\\/index/", @@ -1219,7 +1236,7 @@ "iframe": true, "pager": { "type": 5, - "nextL": "a[aria-disabled='false'][class*='filterProps-Styled-Component'][href]:last-child" + "nextL": "button[aria-current=true]+a:not([aria-disabled])" } }, "Pixiv - 用户作品页": { @@ -1229,7 +1246,7 @@ "style": "ul[class*='-1 ']>li {display: inline !important;} #root{margin-bottom: -125px;} ul>li>button[class^='sc-'][style='background-color: rgb(0,0,0);'],a[href^='/premium/lead/lp'] {display: none !important;}", "pager": { "type": 5, - "nextL": "a[aria-disabled='false'][class*='filterProps-Styled-Component'][href]:last-child" + "nextL": "span.charcoal-pagination-button[aria-current=page]+a.charcoal-pagination-button" } }, "Pixiv - 手机版 - 分类页": { @@ -1239,7 +1256,7 @@ "iframe": true, "pager": { "type": 5, - "nextL": "a.next" + "nextL": "button[aria-current=true]+a" } }, "Pixiv - 手机版 - 用户作品页": { @@ -2068,28 +2085,6 @@ "replaceE": "//a[contains(@class,'active')]/.." } }, - "Steam 创意工坊 - 项目列表": { - "host": "steamcommunity.com", - "url": "return (fun.indexOF('/workshop/browse') || fun.indexOF('/myworkshopfiles/'))", - "pager": { - "nextL": "//a[@class='pagebtn' and text()='>']", - "pageE": ".workshopBrowseItems>*,.workshopItemSubscription,.workshopItemSubscription+script", - "replaceE": ".workshopBrowsePaging,.workshopBrowsePagingWithBG", - "scriptT": 2 - } - }, - "Steam 社区 - 活动评论": { - "host": "steamcommunity.com", - "url": "return (fun.indexOF(/eventcomments\\/\\d/))", - "style": ".forum_paging_controls", - "history": true, - "pager": { - "nextL": "js; return fun.getNextUP('ctp=',/ctp=\\d+/,location.pathname,'2',fun.getCSS('span.commentthread_pagelinks>a:last-child').textContent)", - "pageE": ".commentthread_comments>.commentthread_comment", - "replaceE": ".forum_paging .forum_paging_summary", - "scriptT": 1 - } - }, "小霸王其乐无穷": { "host": "www.yikm.net", "blank": 3, @@ -2109,6 +2104,18 @@ "replaceE": "ul.page-numbers" } }, + "NS头号玩家": { + "host": ["nsthwj.cn","nsthwj.vip"], + "url": "return fun.isPager()", + "pager": { + "nextL": "a.page-next", + "pageE": ".posts-warp>div.col", + "replaceE": ".pagination" + }, + "function": { + "bF": "return fun.src_bF(pageE,[1,'a[data-bg]','data-bg'])" + } + }, "4K 游戏网": { "host": "4k-w.com", "url": "return (fun.indexOF('/game/') || fun.indexOF('s=','s'))", @@ -2176,8 +2183,8 @@ "replaceE": ".post-pagination" } }, - "RuTracker - 帖子列表": { - "host": ["rutracker.org","rutracker.net"], + "RuTracker / Pornolab - 帖子列表": { + "host": ["rutracker.org","rutracker.net","pornolab.net"], "url": "/(viewforum|tracker)\\.php/", "blank": 4, "pager": { @@ -2186,8 +2193,8 @@ "replaceE": "#pagination,.bottom_info>.nav" } }, - "RuTracker - 帖子内": { - "host": ["rutracker.org","rutracker.net"], + "RuTracker / Pornolab - 帖子内": { + "host": ["rutracker.org","rutracker.net","pornolab.net"], "url": "/viewtopic\\.php/", "thread": true, "pager": { @@ -2271,6 +2278,16 @@ "pageE": "a[data-id]" } }, + "SteamUnlocked": { + "host": "steamunlocked.org", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": "span.page-numbers.current+a", + "pageE": ".cover-item.category", + "replaceE": ".nav-links" + } + }, "bilibili - 搜索页": { "host": "search.bilibili.com", "url": "fun.isUrlC(); return ((fun.lp() == '/all' || fun.lp() == '/video' || fun.lp() == '/pgc' || fun.lp() == '/article') && !fun.getCSS('ul.video-list') && !fun.getCSS('#article-list'))", @@ -2739,7 +2756,7 @@ } }, "YTS": { - "host": "yts.mx", + "host": ["yts.bz","yts.lt","yts.gg","yts.am","yts.ag"], "url": "/^\\/browse-movies/", "blank": 3, "pager": { @@ -2800,15 +2817,6 @@ "pageE": ".download>tbody>tr:not(:nth-last-child(-n+2))" } }, - "Knaben": { - "host": "knaben.eu", - "url": "/^\\/(search|browse)\\//", - "blank": 3, - "pager": { - "nextL": "#nextPage", - "pageE": "tbody>tr" - } - }, "idope": { "host": "/^idope\\..+/", "url": "/^\\/torrent-list\\//", @@ -2819,7 +2827,7 @@ } }, "Kickass Torrents": { - "host": ["kickasss.to","katcr.to"], + "host": ["kickasss.to","katcr.to","kickasstorrent.cr","kickass.torrentbay.st"], "url": "return (fun.lp() != '/' && !fun.indexOF('.html') && !fun.indexOF('/popular'))", "blank": 3, "pager": { @@ -2838,6 +2846,16 @@ "replaceE": ".pagination" } }, + "TorrentDownloads": { + "host": "www.torrentdownloads.pro", + "url": "return fun.isPager('r')", + "blank": 3, + "pager": { + "nextL": "//div[@class='pagination_box']//a[text()='>>']", + "pageE": ".inner_container>.grey_bar3", + "replaceE": ".pagination_box" + } + }, "LimeTorrents": { "host": "/^www\\.limetorrents\\./", "url": "return (fun.isTitle('LimeTorrents') && (fun.indexOF('/search/') || fun.indexOF('/browse-torrents')))", @@ -2848,6 +2866,25 @@ "replaceE": ".search_stat" } }, + "EXT Torrents": { + "host": "ext.to", + "url": "/^\\/browse\\//", + "blank": 3, + "pager": { + "nextL": ".pages>li.active+li>a", + "pageE": ".found-content-block table>tbody>tr", + "replaceE": ".pages" + } + }, + "Knaben": { + "host": "knaben.org", + "url": "/^\\/(search|browse)\\//", + "pager": { + "nextL": "#nextPage", + "pageE": ".table.caption-top>tbody>tr", + "replaceE": ".pageNumbers" + } + }, "BTDig": { "host": "btdig.com", "url": "/^\\/search/", @@ -2940,8 +2977,9 @@ "SubHD - 论坛": { "host": ["subhd.tv","subhdtw.com","subhd.la","subhd.cc","subhd.me"], "url": "/^\\/forum\\/(forum|ask)/", + "blank": 3, "pager": { - "nextL": "//a[@class='page-link'][text()='下一页']", + "nextL": ".page-item.active+li>a", "pageE": ".bg-white.shadow-sm.rounded-3>div", "replaceE": "nav.clearfix" } @@ -2949,8 +2987,9 @@ "SubHD": { "host": ["subhd.tv","subhdtw.com","subhd.la","subhd.cc","subhd.me"], "url": "return fun.isPager('r')", + "blank": 3, "pager": { - "nextL": "//a[@class='page-link'][text()='下一页']", + "nextL": ".page-item.active+li>a", "pageE": ".bg-white.shadow-sm.rounded-3", "insertP": ["nav.clearfix",1], "replaceE": "nav.clearfix" @@ -3254,6 +3293,32 @@ "bF": "return fun.src_bF(pageE)" } }, + "SF漫画": { + "host": "manhua.sfacg.com", + "url": "if (fun.indexOF(/^\\/mh\\/.+\\/\\d+\\//)) {setTimeout(()=>{let _img=''; for (let i=0;i`;}; document.getElementById('curPic').parentElement.outerHTML = _img;rule.pager.scrollD = 3000;},1000); rule.pager.scrollD = -9999999; return true;}", + "style": ".page_turning>a[href='javascript:PrePage();'], .page_turning>a[href='javascript:NextPage();'], #pageSel, #Pages, .tucao {display: none !important;} .Reduction_left{width: auto !important;}", + "history": true, + "pager": { + "nextL": "js; if(nextChap != 0) {return (location.origin + '/mh/' + comicFolder + '/' + nextChap + '/');}", + "pageE": "#PicArea>tbody>tr>td>script", + "insertP": ["body",3], + "replaceE": ".Reduction_left", + "scriptT": 2, + "interval": 4000 + }, + "function": { + "aF": "common.getPics(c,chapId,nv,fn,function (json) {picAy = json.data;if (picAy.length == 0) {return;} else {let _img=''; for (let i=0;i`;}; fun.getCSS('#PicArea>tbody>tr>td>img').parentElement.insertAdjacentHTML('beforeend',_img);};}, function (info) {Message(info, 2);});" + } + }, + "SF漫画 - 书库": { + "host": "manhua.sfacg.com", + "url": "return fun.isPager()", + "pager": { + "nextL": ".pagebarNext>a", + "pageE": "ul.Comic_Pic_List", + "replaceE": ".pagebar" + } + }, "快岸漫画": { "host": "www.kanbook.net", "url": "if (fun.indexOF(/^\\/\\d+\\/\\d+\\/\\d+/)) {if (fun.getCSS('img.img-fluid')){fun.getCSS('img.img-fluid').style.display = 'none';}; setTimeout(()=>{let _img = '';for (let i = 0; i < imagesUrlArr.length; i++) {_img += ``;};document.querySelector('.content-wrapper').insertAdjacentHTML('beforeend',_img);},500); return true;}", @@ -3328,6 +3393,34 @@ "replaceE": ".main_control" } }, + "开心漫": { + "host": "www.kaixinman.com", + "url": "/^\\/chapter\\//", + "pager": { + "type": 6, + "nextL": "//div[@class='chapter-toolbar']/a[text()='下一章']", + "pageE": ".chapter-image", + "replaceE": ".chapter-toolbar", + "loadTime": 1000, + "scrollD": 4000 + }, + "function": { + "bF": "pageE.forEach((i)=>{i.className=i.className.replace('loading','');i.style.cssText='background-image: none;';i.innerHTML=''}); return fun.src_bF(pageE)" + } + }, + "开心漫 - 列表": { + "host": "www.kaixinman.com", + "url": "/^\\/category\\//", + "blank": 3, + "pager": { + "nextL": ".page>li.active.hidden-sm+li>a", + "pageE": ".vodlist", + "replaceE": ".page" + }, + "function": { + "bF": "return fun.src_bF(pageE, [1, 'div[data-original]', 'data-original'])" + } + }, "漫画星球 / 6 漫画": { "host": ["/\\.mhxqiu/","/^www\\.sixmh\\d\\./"], "url": "if (fun.indexOF(/\\/\\d+\\.html/)) {return true;} else if (fun.indexOF(/\\/\\d+\\/$/)) {setTimeout(()=>{if (document.getElementById('zhankai')) document.getElementById('zhankai').click();},500);}", @@ -3387,7 +3480,7 @@ } }, "包子漫画": { - "host": ["www.czmanga.com","cn.czmanga.com","www.webmota.com","cn.webmota.com","cn.baozimh.com","cn.baozimhcn.com","tw.baozimhcn.com","cn.dzmanga.com","tw.dzmanga.com","www.twmanga.com","www.kukuc.co","cn.kukuc.co"], + "host": ["www.baozimh.com","cn.baozimh.com","www.bzmgcn.com","cn.bzmgcn.com","www.czmanga.com","cn.czmanga.com","www.webmota.com","cn.webmota.com","cn.baozimh.com","cn.baozimhcn.com","tw.baozimhcn.com","cn.dzmanga.com","tw.dzmanga.com","www.twmanga.com","www.kukuc.co","cn.kukuc.co","cn.cnbzmg.com","tw.cnbzmg.com"], "url": "if (fun.indexOF('/chapter/')) {return true;} else if (fun.indexOF('/comic/')) {if (fun.getCSS('#button_show_all_chatper')) {fun.getCSS('#button_show_all_chatper').click();}}", "style": "#footer,#header {display: none !important;} .header,.bottom-bar {opacity: 0.3;}", "history": true, @@ -3903,6 +3996,15 @@ "replaceE": ".prenext,.page" } }, + "爱下电子书": { + "host": "ixdzs8.com", + "url": "return (fun.indexOF(/^\\/read\\/.+\\.html$/) || fun.isPager())", + "pager": { + "nextL": ".chapter-next, .num.current+a", + "pageE": ".page-content>section, .u-list>li", + "replaceE": ".chapter-act, .page" + } + }, "飘天文学": { "host": "www.piaotia.com", "url": "/^\\/html\\/\\d+\\/\\d+\\/\\d+\\.html", @@ -4055,6 +4157,17 @@ "forceHTTPS": true } }, + "oop.tw": { + "host": "www.oop.tw", + "url": "/^\\/areada\\//", + "pager": { + "type": 6, + "nextL": "#next_url", + "pageE": "#article>p", + "replaceE": ".reading-nav", + "scrollD": 5000 + } + }, "必读推荐": { "host": "www.bidutuijian.com", "url": "/^\\/books\\/.+\\/(?:(?!0000)\\d{4})\\.html/", @@ -4127,6 +4240,17 @@ "replaceE": ".pager" } }, + "八叉书库": { + "host": "www.8xsk.xyz", + "url": "/^\\/novel\\d+\\/chapter/", + "pager": { + "type": 6, + "nextL": "#next_chap", + "pageE": "#chapter-content", + "replaceE": ".chapter-nav", + "loadTime": 1000 + } + }, "蓝鲨": { "host": "www.lan-sha.com", "url": "return (!fun.indexOF('.html'))", @@ -4225,7 +4349,7 @@ "url": "return (fun.lp() == '/' && !location.search)", "pager": { "type": 2, - "nextL": ".active .load-more", + "nextL": ".gh-load-more>button", "interval": 1000, "scrollD": 4000 } @@ -5176,6 +5300,17 @@ "pageE": ".column-list>li" } }, + "Chiphell": { + "host": "www.chiphell.com", + "url": "/^\\/(article-|portal\\.php)/", + "pager": { + "type": 3, + "nextL": ".nxt", + "pageE": "td#article_content,.bm_c.xld>dl", + "insertP": ["td#article_content,.bm_c.xld",6], + "replaceE": ".pg" + } + }, "致美化": { "host": "zhutix.com", "url": "return fun.isPager('p')", @@ -5287,9 +5422,9 @@ "url": "return (fun.indexOF(/\\/(scripts|feedback)$/) || fun.indexOF(/\\/scripts\\/(by-site|libraries|code-search)/) || (fun.indexOF('/discussions') && !fun.indexOF(/\\/\\d+/)))", "blank": 3, "pager": { - "nextL": "a.next_page", + "nextL": "a[aria-current=page]+a", "pageE": "ol#browse-script-list>li,.script-discussion-list,.discussion-list>div", - "replaceE": ".pagination" + "replaceE": ".pagy" } }, "OpenUserJS": { @@ -5468,7 +5603,7 @@ } }, "kmoe": { - "host": ["mox.moe","kox.moe","kxo.moe","koz.moe"], + "host": ["mox.moe","kox.moe","kxo.moe","koz.moe","kxx.moe","kzz.moe"], "url": "return fun.isPager()", "blank": 3, "pager": { @@ -5543,6 +5678,17 @@ "replaceE": ".pg_pointer" } }, + "哲风壁纸": { + "host": "haowallpaper.com", + "url": "/^\\/(homeView|mobileView)($|\\?)/", + "blank": 3, + "pager": { + "type": 6, + "nextL": "js; return fun.getNextEP('.page-content>.current+.isDefault','page=',/page=\\d+/)", + "pageE": "#main-content .card", + "replaceE": ".page-main" + } + }, "Anime Pictures": { "host": "anime-pictures.net", "url": "return (fun.indexOF('/pictures/') && !fun.indexOF('/view_post/'))", @@ -5553,6 +5699,17 @@ "replaceE": ".numeric_pages" } }, + "AnimeCharactersDataBase - ux_search": { + "host": "www.animecharactersdatabase.com", + "url": "/^\\/ux_search\\.php/", + "blank": 3, + "pager": { + "type": 3, + "nextL": "#uxthumbs>.flexcontainer>a.flexitem.bg2.fgw.pad:last-child", + "pageE": "#uxthumbs>a", + "replaceE": "#uxthumbs>.flexcontainer" + } + }, "新片场": { "host": "www.xinpianchang.com", "url": "return (fun.lp() != '/')", @@ -5621,6 +5778,16 @@ "scriptT": 0 } }, + "Hpoi手办维基": { + "host": "www.hpoi.net", + "url": "/^\\/hobby\\/all/", + "pager": { + "nextL": "js; return fun.getNextEP('.hpoi-page-active+li:not(.hpoi-pagination-ellipsis)>a, .hpoi-page-active+li.hpoi-pagination-ellipsis+li:not(.hpoi-pagination-ellipsis)>a','page=',/page=\\d+/)", + "pageE": ".hpoi-glyphicons-list>li", + "replaceE": ".hpoi-pagination", + "scrollD": 1000 + } + }, "资本市场电子化信息披露平台": { "host": "eid.csrc.gov.cn", "url": "/\\/\\d+\\/index/", @@ -5791,7 +5958,7 @@ }, "Xvideos": { "host": ["www.xnxx.com","www.xvideos.com"], - "url": "return fun.isPager('p,r')", + "url": "if(fun.isPager('p,r')){if(fun.indexOF(/^\\/best\\//)){rule.pager.pageE='.mozaique>*,head>script:not([src]),head>script[src$=\\'/runtime.bundle.js\\']';rule.pager.scriptT=2;rule.function.aF='';};return true;}", "blank": 3, "pager": { "nextL": "a.next-page,a.next", @@ -5877,8 +6044,18 @@ "replaceE": "#paging" } }, + "91pron.men": { + "host": ["91pron.men","/^.+\\.(yennew\\.com|scvhuen\\.click|bbbsss\\.org)$/"], + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": "span[aria-current]+a", + "pageE": ".grid.grid-cols-2.md\\:grid-cols-3.xl\\:grid-cols-4.gap-5>div", + "replaceE": "//span[@aria-current]/../../.." + } + }, "xHamster": { - "host": ["/^[a-z]{2}\\.xhamster\\.com$/","/^[a-z]{2}\\..*(xh).*\\.[a-z]{2,}$/"], + "host": ["xhamster.com","/^[a-z]{2}\\.xhamster\\.com$/","/^[a-z]{2}\\..*(xh).*\\.[a-z]{2,}$/"], "url": "return ((fun.isTitle('xHamster') || fun.getCSS('meta[name=application-name][content=xHamster]')) && !fun.indexOF('/videos/') && !fun.indexOF('/photos/gallery'))", "blank": 3, "pager": { @@ -5972,6 +6149,36 @@ "replaceE": ".pages" } }, + "2048 论坛": { + "host": "hjd2048.com", + "url": "/\\/thread\\.php/", + "style": "tr[onmouseover]", + "pager": { + "nextL": ".pages>b+a", + "pageE": "#ajaxtable>tbody[style]>tr", + "replaceE": ".pages" + } + }, + "M系镜像": { + "host": "mirror.chromaso.net", + "url": "if(fun.indexOF(/^\\/thread\\/.+/)){rule.thread=true;rule.pager.pageE='.container>.mm-post';return true;}else if(fun.indexOF(/^\\/(forum|search)\\/.+/)){rule.blank=3;return true;}", + "pager": { + "nextL": ".pagination>.active+li>a", + "pageE": "#thread-table-main>tbody>tr", + "replaceE": ".pagination" + } + }, + "肉视频": { + "host": ["rou.video","rouva2.xyz"], + "url": "/^\\/(t\\/|(v|search)($|\\?))/", + "style": ".grid>div[data-slot=card]+div:not([data-slot=card])", + "blank": 3, + "pager": { + "nextL": "a[aria-current=page]+a", + "pageE": ".grid>div[data-slot=card]", + "replaceE": "//nav[@aria-label='Pagination']/../.." + } + }, "Latino Hentai": { "host": "latinohentai.com", "url": "return (!fun.indexOF('/ver/'))", @@ -5992,6 +6199,15 @@ "replaceE": ".navigation" } }, + "underhentai": { + "host": "www.underhentai.net", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": "span.page-num.active+a.page-num", + "pageE": "article.data-block" + } + }, "Avbebe": { "host": "avbebe.com", "url": "return (!fun.indexOF(/^\\/archives\\/\\d/))", @@ -6271,8 +6487,18 @@ "replaceE": ".pagination" } }, + "18AV": { + "host": ["18av.mm-cg.com","/^mjv\\d{3}\\.com$/"], + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".previous-next a", + "pageE": ".post", + "replaceE": ".pagination-row" + } + }, "JavBooks": { - "host": ["javbooks.com","jmvbt.com","/^[a-z]{2}\\d{4}\\.com$/"], + "host": ["javbooks.com","jmvbt.com","/^jkk\\d{3}\\.com$/"], "url": "return (fun.isTitle('Javbooks') && !fun.indexOF('/content_'))", "blank": 3, "pager": { @@ -6491,7 +6717,7 @@ } }, "hanime1": { - "host": "hanime1.me", + "host": ["hanime1.me","hanimeone.me"], "url": "/^\\/search/", "blank": 3, "pager": { @@ -6505,7 +6731,7 @@ } }, "hanime1 - 漫画 - 分类页": { - "host": "hanime1.me", + "host": ["hanime1.me","hanimeone.me"], "url": "return (fun.lp() == '/comics' || fun.indexOF(/^\\/(tags|artists|characters|parodies|groups)\\//))", "blank": 3, "pager": { @@ -6520,7 +6746,7 @@ } }, "hanime1 - 漫画": { - "host": "hanime1.me", + "host": ["hanime1.me","hanimeone.me"], "url": "/^\\/comic\\/\\d+\\/\\d/", "style": "#current-page-image {display: block !important; margin: 0 auto !important; max-height: calc(250vh) !important;}", "pager": { @@ -6864,7 +7090,7 @@ "style": ".quickGuide,.outer-banner,.item[class*=exoclick],.item[class=item],.photos>div,.media,.static-container-4,.static-container-5,.recommendation_widget", "pager": { "type": 3, - "nextL": "a.pager-next", + "nextL": "a.next", "pageE": ".videos>div.item:not([class*=exoclick]):not([class=item]), .videos>.video, .list>div.item:not([class*=exoclick]):not([class=item]), .photos>a, .fiction-body>.content>p, .fiction-body>.content>.chapters, .lists>a, .comic>div:not([class])", "replaceE": ".pager,.prevNext", "scrollE": ".pager+div+.pager,.prevNext", @@ -6990,6 +7216,68 @@ "replaceE": ".newpagewrap" } }, + "巴卡漫画": { + "host": ["bakamh.com","bakamh.ru","/^baka\\d\\.[a-z]+$/"], + "url": "/^\\/manga\\/.+\\/c-/", + "pager": { + "nextL": ".nav-next>a", + "pageE": ".reading-content>.page-break", + "replaceE": ".select-pagination,.select-view" + } + }, + "巴卡漫画 - 列表页": { + "host": ["bakamh.com","bakamh.ru","/^baka\\d\\.[a-z]+$/"], + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": "a.nextpostslink", + "pageE": "#loop-content>.page-listing-item", + "replaceE": ".wp-pagenavi" + } + }, + "JComic": { + "host": "jcomic.net", + "url": "/^\\/page\\//", + "pager": { + "nextL": "//div[@class='container']//a/button[text()='下一章']/..", + "pageE": ".container>.container+.row.col-lg-12.col-md-12.col-xs-12>img", + "replaceE": ".container>.row.col-lg-12.col-md-12.col-xs-12:first-child" + } + }, + "JComic - cat": { + "host": "jcomic.net", + "url": "/^\\/cat\\//", + "pager": { + "nextL": ".pagination>.active+li>a", + "pageE": "body>.container>div>.row.col-lg-4.col-md-6.col-xs-12", + "replaceE": ".pagination" + } + }, + "色漫天堂": { + "host": "smtt6.com", + "url": "/^\\/man-hua-yue-du\\//", + "pager": { + "nextL": "//div[@class='positionFooter']//a[text()='下一章']", + "pageE": "#conch-content img.lazy", + "replaceE": ".positionFooter", + "scrollD": 4000 + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, + "色漫天堂 - 分类页": { + "host": "smtt6.com", + "url": "/^\\/man-hua-lei-bie/", + "pager": { + "nextL": "//li[@class='hl-hidden-xs']/a[@class='active']/../following-sibling::li[1]/a", + "pageE": "ul.hl-vod-list>li", + "replaceE": ".hl-page-wrap" + }, + "function": { + "bF": "return fun.src_bF(pageE,[1,'a[data-original]','data-original'])" + } + }, "鸟鸟韩漫": { "host": ["/^nnhanman\\.[a-z]+/","/^nnhanman\\d\\.com/","/^nnhm\\d\\.[a-z]+/"], "url": "/^\\/comic\\/.+\\/chapter-\\d+\\.html/", @@ -7093,7 +7381,7 @@ } }, "爱妹子": { - "host": "xx.knit.bid", + "host": ["xx.knit.bid","www.lovecutes.com"], "url": "return fun.getCSS('li.active+li>a')", "blank": 4, "pager": { @@ -7117,6 +7405,7 @@ "pager": { "nextL": ".next", "pageE": ".wp-block-image>img", + "insertP": [".content-main",3], "replaceE": ".simple-page-nav" }, "function": { @@ -7228,6 +7517,16 @@ "replaceE": ".pagination" } }, + "xsnvshen": { + "host": "/^(www|m)\\.xsnvshen\\.[a-z]+$/", + "url": "if(!fun.isMobile() && fun.indexOF(/^\\/album\\/\\d+/)){rule.pager={};rule.hiddenPN=true;rule.blank=0;rule.style='.workContentWrapper {display: none !important;} .showlists.hide {display: unset !important;} .showlists li {float: unset !important;} .swl-item .swi-hd {width: unset !important;height: unset !important;} .showlists img {max-width: unset !important;max-height: unset !important;width: 100% !important;}';return true;}else{return fun.isPager();}", + "blank": 3, + "pager": { + "nextL": "#pageNum .active+a,.pg_next", + "pageE": ".camWholeBoxUl>li,.container>#arcbox img,.body>.list.cl>li", + "replaceE": "#pageNum" + } + }, "秀人美女": { "host": ["/^www\\.xrmn.+/","/^www.xiu\\d+\\./"], "url": "return (fun.isPager() && fun.indexOF(/(^\\/.)|(\\d+\\.html$)/))", @@ -7345,6 +7644,12 @@ "replaceE": "#dm-fy" } }, + "凸凹吧 tuao.cc": { + "host": ["www.tuao.cc","www.nnao.cc","www.24ao.cc"], + "url": "if(fun.indexOF(/^\\/Articles\\/Content\\//)){let d=document.querySelector('#imgData');if(d&&d.value){let a=d.value.split('|');if(a.length>4){const container=document.getElementById('pageContainer');let i=4;const timer=setInterval(()=>{if(i>=a.length){clearInterval(timer);return};const img=document.createElement('img');img.src=atob(a[i]);container.appendChild(img);i++},1000)};return true};}", + "style": "#pagination,body>div:last-of-type,ins", + "hiddenPN": true + }, "仙女图": { "host": "www.xiannvtu.com", "url": "/^\\/v\\//", @@ -7540,7 +7845,7 @@ } }, "4khd.com": { - "host": ["4khd.com","/^(.+)\\.xxtt\\.ink$/"], + "host": ["4khd.com","www.4khd.com","/^(.+)\\.xxtt\\.ink$/","/^(.+)\\.uuss\\.uk$/"], "url": "/^\\/content\\//", "pager": { "type": 3, @@ -7570,13 +7875,16 @@ } }, "黑料网": { - "host": ["18hlw.com","www.hlwxx.com","/.*/"], + "host": ["heiliao.com","18hlw.com","www.hlwxx.com","/.*/"], "url": "return (!fun.indexOF('/archives/') && fun.isTitle('黑料网') && fun.isPager())", "style": ".video-item {height: auto !important;} #notice_container, .infomation, .addbox{display: none !important;}", "blank": 3, "pager": { + "type": 6, "nextL": "a.next", - "pageE": ".video-item" + "pageE": ".video-item", + "loadTime": 800, + "scrollD": 3000 } }, "子夜动漫/七味网 类通用规则": {