diff --git a/.github/ISSUE_TEMPLATE/03-autoPageRequest.yml b/.github/ISSUE_TEMPLATE/03-autoPageRequest.yml index ec1f4a675..e27a94a98 100644 --- a/.github/ISSUE_TEMPLATE/03-autoPageRequest.yml +++ b/.github/ISSUE_TEMPLATE/03-autoPageRequest.yml @@ -14,12 +14,13 @@ body: > [!IMPORTANT] > ### \# 申请必读: > 1. 请先确认 **`不是动态加载内容`** 的网站(**鼠标指向页码,左下角不显示链接即代表是动态加载**),这类网站无法制作规则。 - > 2. 如 **`需要登录`** 才能看到内容,请先联系我**私下告诉账号**,否则我**无法凭空制作**翻页规则(网课类不会添加支持)。 - > 3. 请直接提供 **`具体页面的网页地址 URL`** (特别是一些**页面很多的网站**),尽量减少我的工作量,否则可能拒绝申请。 + > 2. 如 **`需要登录`** 才能看到内容(无论注册有多简单),请**告诉我账号**,否则我**无法凭空制作**翻页规则(网课类不会支持)。 + > 3. 请提供希望添加支持的 **`可翻页(含有页码)的具体网页地址`** 以供我编写规则(特别是**页面很多的网站**),尽量减少我的工作量,否则可能拒绝。 + > 4. 对于 **`正版小说/漫画`** 网站,因为**反爬防盗**的原因也会导致无法制作规则(该脚本本质上也是爬虫,虽然只爬取下一页,但也会被阻碍)。 + > 5. 对于 **`没有 HTTPS`** 的网站(这种网站目前全网占比极少,且大都是一些老旧网站),是不考虑添加支持的。 + > 6. 如果你要申请对 `某个博客/论坛系统` 添加支持(即通用规则,所有使用这个博客/论坛系统的网站都会支持),那么需要提供 `官方博客/论坛地址` 及 其他**几个使用该博客/论坛系统的网站地址**,用于对比、验证,才能写出通用规则。 - > - 另外,对于**正版小说/漫画**网站,因为反爬防盗的原因也会导致无法制作规则(该脚本本质上也是爬虫,虽然只爬取下一页)。 - > - 另外,对于**没有 HTTPS** 的网站(这种网站目前全网占比极少,且大都是一些老旧网站),是不考虑添加支持。 - > - 另外,如果你要申请脚本对 `某个博客/论坛系统` 添加支持(即通用规则,所有使用这个博客/论坛系统的网站都会支持),那么需要提供 `官方博客/论坛地址` 及 其他**几个使用该博客/论坛系统的网站地址**,用于对比、验证,才能写出通用规则。 + > - 对于需要登录才能看的网页,哪怕注册再简单我也不会去主动注册,你可以用一些 **`阅后即焚`** 的网站来告诉我你的账号密码(毕竟 Github 没有私信功能,你可以提前把密码改成别的,我用完了你再改回去),也可以用各种 **`在线临时邮箱`** 网站随便申请个账号给我用,但不管如何你必须提供一个账号给我才能编写规则,这是基本原则。 **** - type: input id: websitename diff --git a/Autopage.user.js b/Autopage.user.js index 43013cfb7..7062dbdb2 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,36 +1,36 @@ // ==UserScript== -// @name 自动无缝翻页 +// @name AutoPager // @name:zh-CN 自动无缝翻页 // @name:zh-TW 自動無縫翻頁 -// @name:en AutoPager -// @version 6.6.36 +// @name:ru Автостраничник +// @version 6.6.75 // @author X.I.U -// @description ⭐无缝加载 下一页内容 至网页底部(类似瀑布流,无限滚动,无需手动点击下一页)⭐,目前支持:【所有「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 ⭐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-TW ⭐無縫加載 下一頁內容 至網頁底部(類似瀑布流,无限滚动,無需手働點擊下一頁)⭐,支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎(Google、Bing、Yahoo...) 等網站~ -// @description:en Append the next page content to the bottom seamlessly (like a waterfall, Unlimited scrolling, no need to manually click on the next page)~ +// @description:ru ⭐Плавно добавляет содержимое следующей страницы к нижней части (как водопад, неограниченная прокрутка, не нужно вручную нажимать на следующую страницу) ⭐, поддерживает различные форумы, соцсети, игры, комиксы, романы, научные статьи, поисковики (Google, Bing, Yahoo...) и другие сайты~ // @match *://*/* // @connect userscript.xiu2.xyz -// @connect userscript.xiu2.us.kg // @connect userscript.h233.eu.org // @connect bitbucket.org +// @connect jsd.onmicrosoft.cn +// @connect wget.la +// @connect ghfast.top +// @connect ghproxy.cfd +// @connect raw.dgithub.xyz +// @connect ghproxy.net +// @connect cdn.jsdmirror.com // @connect js.cdn.haah.net -// @connect raw.ixnic.net -// @connect raw.nuaa.cf -// @connect raw.yzuu.cf // @connect raw.kkgithub.com -// @connect raw.incept.pw -// @connect gitdl.cn -// @connect ghproxy.cc -// @connect ghproxy.net -// @connect ghp.ci -// @connect github.moeyy.xyz -// @connect jsd.onmicrosoft.cn -// @connect cdn.jsdelivr.us // @connect gcore.jsdelivr.net // @connect fastly.jsdelivr.net -// @connect cdn.jsdmirror.com // @connect jsd.proxy.aks.moe // @connect jsdelivr.pai233.top +// @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 @@ -90,41 +90,30 @@ (function() { 'use strict'; - const urlArr = [ // 外置翻页规则更新地址分流,以确保更新成功率(记得 connect) - 'https://userscript.h233.eu.org/other/Autopage/rules.json', - 'https://userscript.xiu2.us.kg/other/Autopage/rules.json', - 'https://bitbucket.org/xiu2/userscript/raw/master/other/Autopage/rules.json', - 'https://raw.kkgithub.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://gitdl.cn/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - //'https://raw.incept.pw/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://raw.ixnic.net/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://raw.nuaa.cf/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://raw.yzuu.cf/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://ghproxy.cc/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://ghproxy.net/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://ghp.ci/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://github.moeyy.xyz/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - //'https://cdn.jsdelivr.us/gh/XIU2/UserScript/other/Autopage/rules.json', - 'https://jsd.onmicrosoft.cn/gh/XIU2/UserScript/other/Autopage/rules.json', + let urlArr = [ // 外置翻页规则更新地址分流,以确保更新成功率(记得 connect) + 'https://cdn.jsdmirror.com/gh/XIU2/UserScript/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://cdn.jsdmirror.com/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://js.cdn.haah.net/gh/XIU2/UserScript/other/Autopage/rules.json', - ], urlArr2 = [ + //'https://jsd.proxy.aks.moe/gh/XIU2/UserScript/other/Autopage/rules.json', + //'https://jsdelivr.pai233.top/gh/XIU2/UserScript/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', - 'https://userscript.xiu2.us.kg/other/Autopage/rules.json', 'https://userscript.xiu2.xyz/other/Autopage/rules.json', 'https://bitbucket.org/xiu2/userscript/raw/master/other/Autopage/rules.json', - 'https://raw.kkgithub.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://gitdl.cn/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://raw.ixnic.net/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://raw.nuaa.cf/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://raw.yzuu.cf/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://ghproxy.net/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://ghp.ci/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', - 'https://github.moeyy.xyz/https://raw.githubusercontent.com/XIU2/UserScript/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://ghfast.top/https://raw.githubusercontent.com/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'], loadMoreExclude2 = ['.steampowered.com','.zcool.com.cn']; @@ -135,9 +124,10 @@ ['menu_page_number', '显示当前页码及点击暂停翻页', '显示当前页码及点击暂停翻页', true], ['menu_pause_page', '左键双击网页空白处暂停翻页', '左键双击网页空白处暂停翻页', false], ['menu_history', '添加历史记录+修改地址/标题', '添加历史记录+修改地址/标题', true], - ['menu_rules', '更新外置翻页规则 (每天自动)', '更新外置翻页规则 (每天自动)', {}], + ['menu_rules', '更新外置翻页规则 (定期自动)', '更新外置翻页规则 (定期自动)', {}], ['menu_customRules', '自定义翻页规则', '自定义翻页规则', {}] ], menuId = [], webType = 0, curSite = {SiteTypeID: 0}, DBSite, DBSite2, DBSiteNow, pausePage = true, pageNum = {now: 1, _now: 1}, urlC = false, nowLocation = '', lp = location.pathname, scriptHandler; + urlArr.push(...urlArr2); // 合并数组 window.autoPage = {lp: ()=>location.pathname, indexOF: indexOF, isMobile: isMobile, isUrlC: isUrlC, isPager: isPager, isTitle: isTitle, blank: forceTarget, getAll: getAll, getOne: getOne, getAllXpath: getAllXpath, getXpath: getXpath, getAllCSS: getAllCSS, getCSS: getCSS, getNextE: getNextE, getNextEP: getNextEP, getNextSP: getNextSP, getNextEPN: getNextEPN, getNextUPN: getNextUPN, getNextUP: getNextUP, getNextF: getNextF, getSearch: getSearch, getCookie: getCookie, insStyle: insStyle, insScript: insScript, cleanuEvent: cleanuEvent, src_bF: src_bF, xs_bF: xs_bF, pageNumIncrement: pageNumIncrement} if (typeof GM_info != 'undefined') {scriptHandler = GM_info.scriptHandler;} else if (typeof GM != 'undefined' && typeof GM.info != 'undefined') {scriptHandler = GM.info.scriptHandler;} else {scriptHandler = '';} for (let i=0;i git 托管系统`); return 15; - } else if (loadMoreExclude(loadMoreExclude1) && getAllCSS('.load-more, .load_more, .loadmore, #load-more, #load_more, #loadmore, [id^="loadmore"], .show-more, .show_more, .ajax-more').length === 1) { + } else if (loadMoreExclude(loadMoreExclude1) && getAllCSS('.load-more, .load_more, .loadmore, #load-more, #load_more, #loadmore, [id^="loadmore"], .show-more:not([data-gps-track]), .show_more, .ajax-more').length === 1) { console.info(`[自动无缝翻页] - 部分自带 自动无缝翻页 的网站 1`); return 8; } else if (loadMoreExclude(loadMoreExclude2) && getAllXpath('//*[self::a or self::span or self::button or self::div][text()="加载更多"][not(@href) or @href="#" or starts-with(@href, "javascript")]').length === 1) { @@ -320,17 +317,19 @@ } else if (getAllCSS('.entry-content .single-content img').length > 3) { DBSite.wp_article_post.pager.pageE = '.entry-content .single-content' } else if (getAllCSS('.entry-content').length == 1) { - DBSite.wp_article_post.pager.pageE = '.entry-content>*:not(.wbp-cbm):not(.page-links):not(.post-links):not(.article-paging):not(.entry-pagination):not(.pagination):not(.fenye):not(.open-message):not(#social):not(.article-social):not(.single-cat-tag):not(.single-meta):not(#fontsize):not(.clear):not(.tg-m):not(.tg-site):not(footer)' + DBSite.wp_article_post.pager.pageE = '.entry-content>*:not(.wbp-cbm):not(.page-links):not(.post-links):not(.article-paging):not(.entry-pagination):not(.pagination):not(.fenye):not(.open-message):not(#social):not(.article-social):not(.single-cat-tag):not(.single-meta):not(#fontsize):not(.clear):not(.tg-m):not(.tg-site):not(footer):not([class*=pagination])' } else if (getAllCSS('.article-content').length == 1) { - DBSite.wp_article_post.pager.pageE = '.article-content>*:not(.page-links):not(.post-links):not(.article-paging):not(.entry-pagination):not(.pagination):not(.fenye):not(.open-message):not(#social):not(.article-social):not(.single-cat-tag):not(.single-meta):not(#fontsize):not(.clear):not(.tg-m):not(.tg-site):not(footer)' + DBSite.wp_article_post.pager.pageE = '.article-content>*:not(.page-links):not(.post-links):not(.article-paging):not(.entry-pagination):not(.pagination):not(.fenye):not(.open-message):not(#social):not(.article-social):not(.single-cat-tag):not(.single-meta):not(#fontsize):not(.clear):not(.tg-m):not(.tg-site):not(footer):not([class*=pagination])' } else if (getAllCSS('article').length == 1) { - DBSite.wp_article_post.pager.pageE = 'article>*:not(.page-links):not(.post-links):not(.article-paging):not(.entry-pagination):not(.pagination):not(.fenye):not(.open-message):not(#social):not(.article-social):not(.single-cat-tag):not(.single-meta):not(#fontsize):not(.clear):not(.tg-m):not(.tg-site):not(footer)' + DBSite.wp_article_post.pager.pageE = 'article>*:not(.page-links):not(.post-links):not(.article-paging):not(.entry-pagination):not(.pagination):not(.fenye):not(.open-message):not(#social):not(.article-social):not(.single-cat-tag):not(.single-meta):not(#fontsize):not(.clear):not(.tg-m):not(.tg-site):not(footer):not([class*=pagination])' } if (DBSite.wp_article_post.pager.pageE != undefined) console.info(`[自动无缝翻页] - 部分使用 WordPress 的网站 - 文章内`); return 11; } - 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="下一頁"]' @@ -371,7 +370,7 @@ if (getAllCSS('.posts-wrapper.row>div>article').length > 3) { DBSite.wp_article.pager.pageE = '.posts-wrapper.row>div' } else if (getAllXpath('//div[contains(@class,"row")]/div/article').length > 3) { - DBSite.wp_article.pager.pageE = '//div[contains(@class,"row")]/div/article/parent::div' + DBSite.wp_article.pager.pageE = '//div[contains(@class,"row")]/div/article' } else if (getAllCSS('article[id^="post-"]').length > 3) { DBSite.wp_article.pager.pageE = 'article[id^="post-"]' } else if (getAllCSS('article[class]').length > 3) { @@ -402,7 +401,7 @@ console.info(`[自动无缝翻页] - 部分影视网站 2`); return 301; } else if (getCSS('.ArticleImageBox, .PictureList') && getCSS('.article_page') && getXpath('//div[contains(@class,"article_page")]//a[text()="下一页"]')) { - console.info(`[自动无缝翻页] - 部分美女图站 - 手机版`); return 302; + console.info(`[自动无缝翻页] - 部分美图网站 - 手机版`); return 302; } else if (getCSS('meta[content^=SearXNG i], link[href*=SearXNG i], script[src*=SearXNG i]')) { console.info(`[自动无缝翻页] - 元搜索引擎`); return 303; @@ -412,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="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]','[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]'] + } 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;} } @@ -463,7 +462,7 @@ curSite = DBSite.yingshi; break; case 301: // < 部分影视网站 2 > curSite = DBSite.yingshi2; break; - case 302: // < 部分美女图站 - 手机版 > + case 302: // < 部分美图网站 - 手机版 > curSite = DBSite.meinvtu_m; break; case 303: // < SearXNG 元搜索引擎 > document.cookie='infinite_scroll=1; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; @@ -477,7 +476,7 @@ /* inherits: 继承标识,仅用于自定义规则,用于增删改某个外置规则的部分规则时,可使用该标识来省略不需要修改的规则,只写有变化的规则 - url: 匹配到该域名后要执行的函数/正则(一般用于根据 URL 分配相应翻页规则) + url: 匹配到该域名后要执行的函数/正则(一般用于根据 URL 分配相应翻页规则,url 规则中可通过操作 rule 这个对象变量来修改当前网页实际应用的规则) urlC: 对于使用 pjax 技术的网站,需要监听 URL 变化来重新判断翻页规则(需要放在 url: 中,自定义规则的话需要使用 fun.isUrlC()) noReferer: 获取下一页内容时,不携带 Referer(部分网站携带与不携带可能不一样) @@ -506,7 +505,7 @@ pager: { isHidden: 只有下一页按钮可见时(没有被隐藏),才会点击 3 = 依靠 [基准元素] 与 [浏览器可视区域底部] 之间的距离缩小来触发翻页(适用于:主体元素下方内容太多 且 高度不固定时) - scrollE: 作为基准线的元素(一般为底部页码元素),和 replaceE 一样的话可以省略 + scrollE: 作为基准线的元素(一般为底部页码元素),省略后默认等同 replaceE(如果这个也未指定则改用 nextL) scrollD: 当 [基准元素] 与 [可视区域底部] 之间的距离 等于或小于该值时,将触发翻页,省略后默认 2000 4 = 动态加载类网站(适用于:简单的动态加载内容网站) @@ -555,6 +554,7 @@ function: { */ //<<< 规则简单说明 >>> DBSite = { loadmore: { + ignore: true, url: function(nextL) {curSite = DBSite.loadmore; curSite.pager.nextL = nextL;}, pager: { type: 2, @@ -563,9 +563,13 @@ function: { } }, // 部分自带 自动无缝翻页 的网站 wp_article: { + ignore: true, 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); } @@ -582,6 +586,7 @@ function: { } }, // 部分使用 WordPress 的网站 wp_article_post: { + ignore: true, pager: { type: 3, scrollD: 3000 @@ -591,6 +596,7 @@ function: { } }, // 部分使用 WordPress 的网站 - 文章内 typecho_handsome: { + ignore: true, url: ()=> {if (getCSS('nav:not([id=comment-navigation]) .page-navigator')) {curSite = DBSite.typecho_handsome;}}, blank: 3, pager: { @@ -600,6 +606,7 @@ function: { } }, // 部分使用 Typecho 的网站 (handsome) typecho_mirages: { + ignore: true, url: ()=> {if (getAllCSS('#index>article, #archive>article').length > 3 && getCSS('li.next')) {curSite = DBSite.typecho_mirages;}}, blank: 3, pager: { @@ -610,6 +617,7 @@ function: { } }, // 部分使用 Typecho 的网站 (Mirages) biquge1: { + ignore: true, url: ()=> {curSite = DBSite.biquge1;xs_bF(getAllCSS('.content > #content'),[/
.{0,10}秒记住.+$/, '']);}, style: 'img, .posterror, a[href*="posterror()"], [style*="background"][style*="url("]:not(html):not(body), #content > *:not(br):not(p), #content>.readinline {display: none !important;}', history: true, @@ -626,6 +634,7 @@ function: { } }, // 笔趣阁 1 模板的小说网站 biquge1_m: { + ignore: true, style: 'img, .posterror, .show-app2, a[href*="posterror()"], [onclick*="location.href"], [style*="background"][style*="url("]:not(html):not(body), #nr1>*:not(br):not(p), #chaptercontent>*:not(br):not(p), .Readarea>*:not(br):not(p), .ReadAjax_content>*:not(br):not(p), #nr1>.readinline, #chaptercontent>.readinline, .Readarea>.readinline, .ReadAjax_content>.readinline {display: none !important;}', history: true, retry: 3000, @@ -637,6 +646,7 @@ function: { } }, // 笔趣阁 1 - 手机版 模板的小说网站 biquge2: { + ignore: true, url: ()=> {if (isMobile() || getCSS('.chapter-page-btn') != null) {curSite = DBSite.biquge2_m;} else {curSite = DBSite.biquge2;}}, style: 'img, .posterror, a[href*="posterror()"], [style*="background"][style*="url("]:not(html):not(body), #txt > *:not(br):not(p), #txt>.readinline, .txt>.readinline {display: none !important;}', history: true, @@ -652,6 +662,7 @@ function: { } }, // 笔趣阁 2 模板的小说网站 biquge2_m: { + ignore: true, style: 'img, .posterror, a[href*="posterror()"], [style*="background"][style*="url("]:not(html):not(body), #txt > *:not(br):not(p), #txt>.readinline, .txt>.readinline {display: none !important;}', history: true, retry: 3000, @@ -663,11 +674,12 @@ function: { } }, // 笔趣阁 2 - 手机版 模板的小说网站 biquge3: { + ignore: true, style: 'img, .posterror, a[href*="posterror()"], [style*="background"][style*="url("]:not(html):not(body), script+div[style="padding:15px;"], p[style*="font-weight:"] {display: none !important;}', history: true, retry: 3000, pager: { - nextL: 'js; const a=[fun.getNextE(\'//a[contains(text(), "下一页")]\'),fun.getNextE(\'//a[contains(text(), "下一章")]\'),fun.getNextE(\'//a[contains(text(), "下一节")]\')];if (a[0]){return a[0];}else if(a[1]){return a[1];}else if(a[2]){return a[2];}', + nextL: 'js; const a=[fun.getNextE(\'(//a[contains(text(), "下一页")])[last()]\'),fun.getNextE(\'(//a[contains(text(), "下一章")])[last()]\'),fun.getNextE(\'(//a[contains(text(), "下一节")])[last()]\')];return a.find(i => i)', insertP6Br: false, replaceE: '//a[contains(text(), "下一章") or contains(text(), "下一页") or contains(text(), "下一节")]/parent::*' }, @@ -677,6 +689,7 @@ function: { } }, // 笔趣阁 3 模板的小说网站 yingshi: { + ignore: true, style: 'div.stui-page__all, div.myui-page__all {display: none !important;}', blank: 3, pager: { @@ -690,6 +703,7 @@ function: { } }, // 部分影视网站 yingshi2: { + ignore: true, blank: 3, style: '.module-poster-item, .module-items>* {display: inline-block !important;}', pager: { @@ -702,6 +716,7 @@ function: { } }, // 部分影视网站 2 meinvtu_m: { + ignore: true, history: true, blank: 3, pager: { @@ -711,31 +726,36 @@ function: { replaceE: '.article_page', scrollD: 500 } - }, // 部分美女图站 - 手机版 + }, // 部分美图网站 - 手机版 discuz_forum: { + ignore: true, pager: { type: 2, nextL: '#autopbn', - nextTextOf: '下一' + interval: 800 } }, // Discuz! 论坛 - 帖子列表(自带无缝加载下一页按钮的) discuz_guide: { + ignore: true, pager: { nextL: 'a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])', - pageE: 'tbody[id^="normalthread_"]', + pageE: 'tbody[id^="normalthread_"],tbody[id^="stickthread_"]', replaceE: '.pg, .pages', forceHTTPS: true } - }, // Discuz! 论坛 - 导读页 及 帖子列表(不带无缝加载下一页按钮的) + }, // Discuz! 论坛 - 导读页 及 帖子列表(不带无缝加载下一页按钮的,或存在按钮但只是单纯跳转下一页链接的) discuz_waterfall: { + ignore: true, + style: '.pgbtn', pager: { nextL: 'a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])', - pageE: '#waterfall > li', + pageE: '#waterfall > li, #waterfall > dl', replaceE: '.pg, .pages', forceHTTPS: true } - }, // Discuz! 论坛 - 图片模式的帖子列表(不带无缝加载下一页按钮的) + }, // Discuz! 论坛 - 图片模式的帖子列表(不带无缝加载下一页按钮的,或存在按钮但只是单纯跳转下一页链接的) discuz_thread: { + ignore: true, thread: true, style: '.pgbtn, .viewthread:not(:first-of-type)>h1, .viewthread:not(:first-of-type)>ins, .viewthread:not(:first-of-type)>.headactions {display: none;}', pager: { @@ -750,6 +770,7 @@ function: { } }, // Discuz! 论坛 - 帖子内 discuz_search: { + ignore: true, pager: { nextL: 'a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])', pageE: '#threadlist > ul', @@ -758,6 +779,7 @@ function: { } }, // Discuz! 论坛 - 搜索页 discuz_youspace: { + ignore: true, pager: { nextL: 'a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])', pageE: 'form:not([action^="search.php?"]) tbody > tr:not(.th)', @@ -766,6 +788,7 @@ function: { } }, // Discuz! 论坛 - 回复页、主题页(别人的) discuz_collection: { + ignore: true, pager: { nextL: 'a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])', pageE: '#ct .bm_c table > tbody', @@ -774,12 +797,14 @@ function: { } }, // Discuz! 论坛 - 淘帖页 discuz_archiver: { + ignore: true, pager: { nextL: '//div[@id="content"][last()]//div[@class="page"]/strong/following-sibling::a[1]', pageE: '#content' } }, // Discuz! 论坛 - 归档页 discuz_m: { + ignore: true, thread: true, pager: { nextL: '//a[@class="nxt" or @class="next"] | //div[@class="page"]/a[text()="下一页" or contains(text(), ">")]', @@ -789,6 +814,7 @@ function: { } }, // Discuz! 论坛 - 触屏手机版 - 帖子内 discuz_m_forum: { + ignore: true, pager: { type: 2, nextL: 'a.loadmore', @@ -797,6 +823,7 @@ function: { } }, // Discuz! 论坛 - 触屏手机版 - 帖子列表(自带无缝加载下一页按钮的) flarum: { + ignore: true, url: ()=> {urlC = true;if (!indexOF('/d/')) {if(getCSS('.DiscussionList-loadMore')){curSite = DBSite.flarum;}else if(getCSS('a.Button--primary')){curSite = DBSite.flarum2;}}}, pager: { type: 2, @@ -805,6 +832,7 @@ function: { } }, // Flarum 论坛 flarum2: { + ignore: true, blank: 4, pager: { type: 6, @@ -814,6 +842,7 @@ function: { } }, // Flarum 论坛 - 带页码的 phpbb: { + ignore: true, url: ()=> {if (indexOF('/viewforum.php')) { curSite = DBSite.phpbb; } else if (indexOF('/viewtopic.php')) { @@ -828,6 +857,7 @@ function: { } }, // phpBB 论坛 - 帖子列表 phpbb_post: { + ignore: true, thread: true, pager: { nextL: '.pagination li.next a[rel="next"], .topic-actions .pagination strong~a', @@ -836,6 +866,7 @@ function: { } }, // phpBB 论坛 - 帖子内 phpbb_search: { + ignore: true, pager: { nextL: '.pagination li.next a[rel="next"], .topic-actions .pagination strong~a', pageE: 'div.search.post', @@ -843,6 +874,7 @@ function: { } }, // phpBB 论坛 - 搜索页 xenforo: { + ignore: true, url: ()=> {if (indexOF(/\/(forums|f)\//) || (getCSS(DBSite.xenforo.pager.nextL) && getCSS(DBSite.xenforo.pager.pageE))) { curSite = DBSite.xenforo; } else if (indexOF(/\/(threads|t)\//) || (getCSS(DBSite.xenforo.pager.nextL) && getCSS(DBSite.xenforo_post.pager.pageE))) { @@ -850,14 +882,16 @@ function: { } else if (indexOF('/search/') || (getCSS(DBSite.xenforo.pager.nextL) && getCSS(DBSite.xenforo_search.pager.pageE))) { curSite = DBSite.xenforo_search; }}, + blank: 3, pager: { nextL: 'a.pageNav-jump--next', - pageE: '.structItemContainer-group.js-threadList > div', + pageE: '.structItemContainer > div', replaceE: 'nav.pageNavWrapper', scrollD: 2500 } }, // XenForo 论坛 - 帖子列表 xenforo_post: { + ignore: true, thread: true, pager: { nextL: 'a.pageNav-jump--next', @@ -867,6 +901,8 @@ function: { } }, // XenForo 论坛 - 帖子内 xenforo_search: { + ignore: true, + blank: 3, pager: { nextL: 'a.pageNav-jump--next', pageE: 'ol.block-body > li', @@ -875,6 +911,7 @@ function: { } }, // XenForo 论坛 - 搜索页 mybb: { + ignore: true, url: ()=> {if (location.pathname.toLowerCase().indexOf('/forum') == 0 || location.pathname.toLowerCase().indexOf('/search') == 0 || (getCSS(DBSite.mybb.pager.nextL)&&getCSS(DBSite.mybb.pager.pageE))) { curSite = DBSite.mybb; } else if (location.pathname.toLowerCase().indexOf('thread') !== -1 || (getCSS(DBSite.mybb.pager.nextL)&&getCSS(DBSite.mybb_post.pager.pageE))) { @@ -889,6 +926,7 @@ function: { } }, // MyBB 论坛 - 帖子列表 mybb_post: { + ignore: true, thread: true, pager: { pageE: '#posts>*', @@ -896,6 +934,7 @@ function: { } }, // MyBB 论坛 - 帖子内 xiuno: { + ignore: true, url: ()=> {if (lp == '/' || indexOF(/\/(index|forum)/)) {curSite = DBSite.xiuno;} else if (indexOF('/thread')) {curSite = DBSite.xiuno_post;}}, pager: { nextL: '//li[@class="page-item"]/a[text()="▶" or text()="»" or contains(text(),">") or contains(text(),"下一页")]', @@ -904,6 +943,7 @@ function: { } }, // Xiuno 论坛 - 帖子列表 xiuno_post: { + ignore: true, thread: true, pager: { nextL: '//li[@class="page-item"]/a[text()="▶" or text()="»" or contains(text(),">") or contains(text(),"下一页")]', @@ -912,6 +952,7 @@ function: { } }, // Xiuno 论坛 - 帖子内 forgejoGitea: { + ignore: true, url: ()=> {if (indexOF(/^\/explore\/.+/) || indexOF(/\/(issues|pulls|releases|tags)$/) || indexOF(/\/commits\/branch\/.+/) || (getCSS('.pagination>.active+.item') && getCSS('.flex-list>.flex-item'))) {curSite = DBSite.forgejoGitea;}}, pager: { nextL: '.pagination>.active+.item', @@ -920,6 +961,7 @@ function: { } }, // Forgejo/Gitea git 托管系统 - explore/issues/releases/tag/commit nexusphp: { + ignore: true, url: ()=> { if (lp == '/torrents.php' || getCSS('table.torrents')) { curSite = DBSite.nexusphp; @@ -940,6 +982,20 @@ function: { replaceE: '//p[@align][./font[@class="gray"]]' } }, // NexusPHP 论坛 + "必应搜索 + 手机版": { + host: ['www.bing.com','cn.bing.com','www4.bing.com','global.bing.com'], + url: ()=> {urlC = true;if (lp == '/search') {curSite = DBSite["必应搜索 + 手机版"];if (isMobile()){curSite.blank=3;curSite.pager.type=6;curSite.pager.loadTime=1500;curSite.pager.scrollD=3000;}}}, + style: '#b_footer,.b_msg,#bnp_rich_div,.cn_related_search_upsell_container', + history: true, + pager: { + nextL: 'a.sb_pagN,a.sb_halfnext,a.sb_fullnpl', + pageE: '#b_results>li.b_algo', + replaceE: '#b_results>.b_pag,#b_PagAboveFooter' + }, + function: { + bF: (pageE)=>{pageE.forEach(function (one) {getAllCSS('div.rms_iac[data-src]',one).forEach(function (one1) {one1.outerHTML = ``; }) }); return pageE} + } + }, // 必应搜索 + 手机版 为了解决部分用户/浏览器下因为 CSP 无法使用的问题,暂时先移动到内置规则 nexusmods: { host: 'www.nexusmods.com', url: ()=> {urlC = true; if (indexOF(/\/(mods|users)\/\d+/)) {if (indexOF('tab=posts','s')){curSite = DBSite.nexusmods_posts;} else if (indexOF('tab=user+files','s')){curSite = DBSite.nexusmods;}} else if (lp !== '/' && getCSS('.pagination a.page-selected')) {curSite = DBSite.nexusmods;}}, @@ -957,6 +1013,7 @@ function: { } }, // NexusMods nexusmods_posts: { + ignore: true, history: false, xRequestedWith: true, pager: { @@ -966,79 +1023,6 @@ function: { scrollD: 3500 } }, // NexusMods posts - manhuacat: { - host: 'www.manhuacat.com', - url: ()=> {if (indexOF(/\/(manga|manhua)\/\d+\/.+\.html/)) { - if (getCookie('is_pull') == 'true') { // 强制关闭 [下拉] 模式 - document.cookie='is_pull=false; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 关闭 [下拉] 模式 - location.reload(); // 刷新网页 - } - setTimeout(manhuacat_init, 100); - curSite = DBSite.manhuacat; - }}, - style: '#left, #right, #pull-load, .loading, .pagination, footer {display: none !important;} .img-content > img {display: block !important;margin: 0 auto !important; border: none !important; padding: 0 !important; max-width: 99% !important; height: auto !important;}', // 隐藏不需要的元素,调整图片 - pager: { - type: 4, - nextL: manhuacat_nextL, - insertP: ['.img-content', 3], - insertE: manhuacat_insertE, - replaceE: '.comic-detail > .breadcrumb-bar, .comic-detail >h2.h4, .vg-r-data, body > script:not([src])', - interval: 3000, - scrollD: 4000 - } - }, // 漫画猫 - hicomic: { - host: 'www.hicomic.net', - url: ()=> {if (indexOF('/chapters/')) { - setTimeout(hicomic_init, 100); - curSite = DBSite.hicomic; - }}, - style: '.content {height: auto !important;} .footer, .left_cursor, .right_cursor, .finish {display: none !important;} .content > img {display: block !important;margin: 0 auto !important;}', - pager: { - type: 4, - nextL: hicomic_nextL, - insertP: ['.content', 3], - insertE: hicomic_insertE, - interval: 5000, - scrollD: 3000 - } - }, // HiComic (嗨漫画) - alimanhua: { - host: ['www.alimanhua.com','www.iimanhua.cc'], - url: ()=> { - if (indexOF(/\/\d+\.html$/)) { - curSite = DBSite.alimanhua; - pausePage = false; - setTimeout(()=>{pausePage = true;}, 5000) - } else if (indexOF(/^\/(manhua|comic)\/\d+\/$/)) { - setTimeout(()=>{getCSS('#openBook').click()}, 500) - } else if (lp != '/'){ - curSite = DBSite.alimanhua_list; - } - }, - style: 'iframe {display: none !important;}', - pager: { - type: 4, - nextL: alimanhua_nextL, - pageE: 'head>script:not([src])', - insertP: ['#viewimages', 3], - insertE: alimanhua_insertE, - interval: 3000, - scrollD: 3000 - } - }, // 阿狸漫画 + 爱漫画 - alimanhua_list: { - blank: 3, - pager: { - nextL: '#pager>b+a', - pageE: '#dmList>ul', - replaceE: '#pager', - scrollD: 800 - }, - function: { - bF: "return fun.src_bF(pageE, [0, 'img[_src]', '_src'])" - } - }, // 阿狸漫画 - 分类/搜索页 mangabz: { host: ['mangabz.com', 'www.mangabz.com'], url: ()=> {if (indexOF(/\/m\d+/)) { @@ -1060,6 +1044,7 @@ function: { } }, // Mangabz 漫画 mangabz_list: { + ignore: true, blank: 4, pager: { nextL: '//div[contains(@class,"page-pagination")]//a[contains(text(), ">")]', @@ -1068,7 +1053,7 @@ function: { scrollD: 800 } }, // Mangabz 漫画 - 分类/搜索页 - dm5: { + dm5: { host: 'www.dm5.com', url: ()=> {if (indexOF(/\/m\d+/)) { setTimeout(mangabz_init, 1500); @@ -1112,6 +1097,7 @@ function: { } }, // Xmanhua 漫画 xmanhua_list: { + ignore: true, blank: 4, pager: { nextL: '//div[@class="page-pagination"]//a[contains(text(), ">")]', @@ -1121,34 +1107,38 @@ function: { } } // Xmanhua 漫画 - 分类/搜索页 }; + let _customRules = GM_getValue('menu_customRules', {}), + _rules = GM_getValue('menu_rules', {}) + if (Object.prototype.toString.call(_customRules) !== '[object Object]') {_customRules={};} + if (Object.prototype.toString.call(_rules) !== '[object Object]') {_rules={};} + let _customRulesKeys = Object.keys(_customRules), + _rulesKeys = Object.keys(_rules) // 合并 自定义规则、外置规则、内置规则(注:Object.assign 合并对象时,同名会后者覆盖前者) - if (Object.keys(GM_getValue('menu_customRules', {})).length === 0) { // 如果自定义规则为空,则直接合并 外置规则、内置规则 - DBSite = Object.assign({}, GM_getValue('menu_rules', {}), DBSite); - DBSite2 = GM_getValue('menu_rules', {}); + if (_customRulesKeys.length === 0) { // 如果自定义规则为空,则直接合并 外置规则、内置规则 + DBSite = Object.assign({}, _rules, DBSite); + DBSite2 = structuredClone(_rules); // DBSite2 是提供给 自定义翻页规则界面 - 所有规则 显示用的 } else { // 如果有自定义规则,为避免外置规则覆盖同名的自定义规则,要先判断并移除同名的外置规则 - let a = GM_getValue('menu_customRules', {}), a1 = Object.keys(a), - b = GM_getValue('menu_rules', {}), b1 = Object.keys(b) - for (let i = 0; i < a1.length; i++) { // 循环 [自定义规则-对象名] 数组 - if (b1.indexOf(a1[i]) != -1) { // 在 [外置规则-对象名] 数组中,寻找是否有同名的 [自定义规则-对象名] - if (a[a1[i]].inherits === true){ // 如果该同名的自定义规则对象含有 inherits 继承标识,则将同名的两者合并(自定义 覆盖 外置) + for (let i = 0; i < _customRulesKeys.length; i++) { // 循环 [自定义规则-对象名] 数组 + if (_rulesKeys.indexOf(_customRulesKeys[i]) != -1) { // 在 [外置规则-对象名] 数组中,寻找是否有同名的 [自定义规则-对象名] + if (_customRules[_customRulesKeys[i]].inherits === true){ // 如果该同名的自定义规则对象含有 inherits 继承标识,则将同名的两者合并(自定义 覆盖 外置) // 如果自定义规则中包含 "pager":{} 规则,则需要先合并 pager 后再去合并整体规则(否则 pager 会被自定义规则完整覆盖) - if (a[a1[i]].pager != undefined && b[a1[i]].pager != undefined) {a[a1[i]].pager = Object.assign({}, b[a1[i]].pager, a[a1[i]].pager)} - a[a1[i]] = Object.assign({}, b[a1[i]], a[a1[i]]); + if (_customRules[_customRulesKeys[i]].pager != undefined && _rules[_customRulesKeys[i]].pager != undefined) {_customRules[_customRulesKeys[i]].pager = Object.assign({}, _rules[_customRulesKeys[i]].pager, _customRules[_customRulesKeys[i]].pager)} + _customRules[_customRulesKeys[i]] = Object.assign({}, _rules[_customRulesKeys[i]], _customRules[_customRulesKeys[i]]); } - delete b[a1[i]] // 删除外置规则中的同名,这样后续合并时,外置规则才不会覆盖自定义规则的同名规则 + delete _rules[_customRulesKeys[i]] // 删除外置规则中的同名,这样后续合并时,外置规则才不会覆盖自定义规则的同名规则 }; } - DBSite = Object.assign({}, a, b, DBSite); - DBSite2 = Object.assign({}, JSON.parse(JSON.stringify(a)), JSON.parse(JSON.stringify(b))); // 为了避免对象的后续变化影响 DBSite2 内容(如 SiteTypeID),需要对 a b 变量进行完全克隆,使其完全独立 + DBSite = Object.assign({}, _customRules, _rules, DBSite); + DBSite2 = Object.assign({}, structuredClone(_customRules), structuredClone(_rules)); // 为了避免对象的后续变化影响 DBSite2 内容(如 SiteTypeID 等),需要对JSON对象变量进行深拷贝,使其完全独立 } // 生成 SiteTypeID setSiteTypeID(); //console.log(DBSite) } - // 外置翻页规则 + // 更新外置翻页规则 function getRulesUrl(update = false) { - // 如果是原来的时间格式 或 刚安装脚本,则需要立即更新 + // 如果是 旧版本的字符串时间格式(当前为数字格式)或 刚安装脚本(取不到值会返回字符串 '' 空),则需要立即更新 if (typeof(GM_getValue('menu_ruleUpdateTime', '')) == 'string') {update = true; if (scriptHandler != 'AdGuard') {alert('请点击【确定】开始首次获取【外置翻页规则】(大概几秒\n\n在此期间请不要 操作/跳转/关闭 当前网页~\n\n如果不小心没获取成功也没事,可以去脚本菜单中手动【更新外置翻页规则】即可(浏览器右上角 Tampermonkey 扩展图标内的脚本菜单\n\n\n另外,想要【临时暂停翻页】请点击左下角悬浮的【页码】按钮\n\n如果每次打开网页都会看到该提示,说明你的 油猴脚本管理器与本脚本之间 存在兼容性问题,请更换其他试试!');} else {urlArr2 = urlArr}} if (update) { // 手动更新(或安装后首次更新) @@ -1170,8 +1160,8 @@ function: { timeout: 4000, onload: function (response) { try { - //console.log('最终 URL:' + response.finalUrl, '返回内容:',response.response, response.responseHeaders) - if (response.response) { + //console.log('最终 URL:' + response.finalUrl, '返回内容:',response.status,response.response,response.responseText, response.responseHeaders) + if (response.status === 200 && response.response && Object.prototype.toString.call(response.response) === '[object Object]' && Object.keys(response.response).length > 100) { GM_setValue('menu_rules', response.response); // 写入最新规则 GM_setValue('menu_ruleUpdateTime', parseInt(+new Date()/1000)); // 写入当前时间戳 @@ -1188,7 +1178,7 @@ function: { if (n) GM_notification({text: '✅ 已更新外置翻页规则!\n如果依然无法翻页,说明还不支持当前网页,点击此处提交申请~', timeout: 5000, onclick: function(){GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});GM_openInTab('https://greasyfork.org/zh-CN/scripts/419215/feedback', {active: true,insert: true,setParent: true});}}); } else { - console.log('URL:' + url); + console.log('URL:' + url, response); GM_notification({text: '❌ 为空!更新失败,请再试几次...\n如果依然更新失败,请联系作者解决...', timeout: 5000}); if (n) {urlArr2.splice(urlArr2.indexOf(url), 1)} else {urlArr.splice(urlArr.indexOf(url), 1)} } @@ -1316,7 +1306,7 @@ function: { if (getCSS('#autopbn')) { // 判断是否有 [下一页] 按钮 curSite = DBSite.discuz_forum; } else if (getCSS('#waterfall')) { // 判断是否为图片模式 - if (!getCSS('#pgbtn, .pgbtn')) { // 如果各版块帖子列表已存在这个元素,说明自带了无缝翻页 + if (!getCSS('#pgbtn.pgbtn>a[href^=javascript]')) { // 如果各版块帖子列表已存在这个元素,说明自带了无缝翻页 curSite = DBSite.discuz_waterfall; waterfallStyle(); // 图片模式列表样式预处理 } } else { @@ -1409,8 +1399,15 @@ function: { } // [Discuz! 论坛] 图片模式列表样式预处理 function waterfallStyle() { - let width = getCSS('#waterfall > li:first-child').style.width; - if (width) insStyle(`#waterfall {height: auto !important; width: 100% !important;} #waterfall > li {width: ${width} !important; float: left !important; position: inherit !important; left: auto !important; top: auto !important;}`); + let waterfall_ = getCSS('#waterfall > li:first-child'); + if (waterfall_ && waterfall_.style && waterfall_.style.width) { + insStyle(`#waterfall {height: auto !important; width: 100% !important;} #waterfall > li {width: ${waterfall_.style.width} !important; float: left !important; position: inherit !important; left: auto !important; top: auto !important;}`); + } else { + waterfall_ = getAllCSS('#waterfall > dl'); + if (waterfall_ && waterfall_.length > 5) { + insStyle(`#waterfall > dl {display: unset !important;}`); + } + } } @@ -1471,124 +1468,6 @@ function: { } - // [漫画猫] 初始化(显示本话所以图片) - function manhuacat_init() { - let _img = ''; - for (let now of img_data_arr) {_img += ``;} - getOne(curSite.pager.insertP[0]).innerHTML = _img; - - } - // [漫画猫] 获取下一页地址 - function manhuacat_nextL(pageE, type) { - if (type === 'url') { - if(pageE.code == '0000') { - if (pageE.url === curSite.pageUrl) return - curSite.pageUrl = pageE.url; - getPageE_(curSite.pageUrl); // 真正的下一页链接 - } - } else { - let vg_r_data = getCSS('.vg-r-data'); - if (vg_r_data) { - getPageE_(`${location.origin}/chapter_num?chapter_id=${vg_r_data.dataset.chapter_num}&ctype=1&type=${vg_r_data.dataset.chapterType};`, 'json', 'GET', '', 'url'); - } - } - } - // [漫画猫] 插入数据 - function manhuacat_insertE(pageE, type) { - if (!pageE) return - if (type === 'url') { // 获取下一页链接 - manhuacat_nextL(pageE, type); return - } - addHistory(pageE); - replaceElems(pageE); - - // 插入图片 - let _img = '', _img_arr = LZString.decompressFromBase64(getXpath('//body/script[not(@src)][contains(text(), "img_data")]').textContent.split('"')[1]).split(','), vg_r_data = getCSS('.vg-r-data');; - for (let now of _img_arr) {_img += ``;} - if (_img) { - getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中 - pageNumIncrement() - } - } - - - - // [HiComic(嗨漫画)] 初始化(将本话其余图片插入网页中) - function hicomic_init() { - let _img = ''; - getAllCSS('.chapter > section:not(:first-child) > section[val]').forEach(function (one) { - let src = one.getAttribute('val'); - if (src.indexOf('!p_c_c_') === -1) src += '!p_c_c_h' - _img += `` - }) - getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中 - window.document.title = window.document.title.replace(/(\(第.+\))? - HiComic/, `(${getCSS('.chapter_name').textContent}) - HiComic`); // 修改网页标题(加上 第 X 话) - } - // [HiComic(嗨漫画)] 获取下一页地址 - function hicomic_nextL() { - let nextId; - nextId = getCSS('.next_chapter:not(.end)') - if (nextId && nextId.id && nextId.id != 'None') { - curSite.pageUrl = location.href; - getPageE_(`https://www.hicomic.net/api/web/chapter/${nextId.id}/contents`, 'json'); - } - } - // [HiComic(嗨漫画)] 插入数据 - function hicomic_insertE(pageE, type) { - if (!pageE || pageE.code != 200) return - if (pageE.results.chapter.next) { // 写入下一页的 UUID - getCSS('.next_chapter').id = pageE.results.chapter.next; - } else { - getCSS('.next_chapter').id = 'None'; - getCSS('.next_chapter').classList.add('end'); - } - curSite.pageUrl =`https://www.hicomic.net/chapters/${pageE.results.chapter.uuid}/contents` - getCSS('.chapter_name').textContent = pageE.results.chapter.name; // 修改漫画标题 - addHistory(pageE, window.document.title.replace(/(\(第.+\))? - HiComic/, `(${pageE.results.chapter.name}) - HiComic`)); - let _img = ''; - for (let i = 0; i < pageE.results.chapter.contents.length; i++) { // 遍历图片文件名数组,组合为 img 标签 - let src = pageE.results.chapter.contents[i].url; - if (src.indexOf('!p_c_c_') === -1) src += '!p_c_c_h'; - _img += `` - } - getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中 - pageNumIncrement() - } - - - // [阿狸漫画] 获取下一页地址 - function alimanhua_nextL(pageE, type) { - if (type === 'url') { - if(pageE.status == 1){ - if (pageE.url === curSite.pageUrl) return - curSite.pageUrl = pageE.url; - getPageE_(curSite.pageUrl); // 真正的下一页链接 - } else { - curSite = {SiteTypeID: 0} - alert("已经是最后一章!"); - } - } else { - getPageE_(`${location.origin}/e/extend/ret_page/mindex.php?bid=${window.location.href.split("/")[4]}&id=${window.location.href.split("/")[5]}&u=1`, 'json', 'GET', '', 'url'); - } - } - // [阿狸漫画] 插入数据 - function alimanhua_insertE(pageE, type) { - if (!pageE) return - if (type === 'url') { // 获取下一页链接 - alimanhua_nextL(pageE, type); return - } - insScript('head>script:not([src])', pageE); - - // 插入图片 - let _img = '', _host='http://res.img.tueqi.com/'; - if (location.hostname == '') _host = 'https://res.img.96youhuiquan.com/' - for (let i=1;i`;} - getCSS(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); - addHistory(pageE); - pageNumIncrement() - } - - // [Mangabz 漫画] 初始化(调整本话图片) function mangabz_init() { if (getCSS('#showimage')) getCSS('#showimage').removeAttribute('oncontextmenu'); @@ -1745,7 +1624,13 @@ function: { scrollD = curSite.pager.scrollD; // <<<<< 翻页类型 3(依靠 [基准元素] 与 [浏览器可视区域底部] 之间的距离缩小来触发翻页)>>>>> if (curSite.pager.type === 3) { - if (!curSite.pager.scrollE) curSite.pager.scrollE = curSite.pager.replaceE; // 默认基准元素是页码 + if (!curSite.pager.scrollE) { // 当 scrollE 未指定时 + if(curSite.pager.replaceE) { // 如果指定了 replaceE,则默认 scrollE 为 replaceE + curSite.pager.scrollE = curSite.pager.replaceE; + } else { // 如果 replaceE 也未指定,则默认 scrollE 为 nextL + curSite.pager.scrollE = curSite.pager.nextL; + } + } let scrollE = getOne(curSite.pager.scrollE); //console.log(scrollE.offsetTop, scrollE.offsetTop - (scrollTop + scrollHeight), scrollD, scrollTop + scrollHeight, curSite.SiteTypeID) if (scrollE.offsetTop - (scrollTop + scrollHeight) <= scrollD) {intervalPause(); checkURL(getPageE);} @@ -1799,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)); @@ -1815,7 +1736,7 @@ function: { //console.log('URL:' + url, '最终 URL:' + xhr.responseURL, '返回内容:' + xhr.responseText) processElems(createDocumentByString(xhr.responseText)); } catch (e) { - console.error('[自动无缝翻页] - 处理获取到的下一页内容时出现问题,请检查!', 'URL:' + url, '最终 URL:' + xhr.responseURL, '返回状态:' + xhr.statusText, '返回内容:' + xhr.responseText); + console.error('[自动无缝翻页] - 处理获取到的下一页内容时出现问题,请检查!\n', e, '\nURL:' + url, '\n最终 URL:' + xhr.responseURL, '\n返回状态:' + xhr.statusText, '\n返回内容:' + xhr.responseText); } }; xhr.onerror = function() { @@ -1828,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('[自动无缝翻页] - 处理获取到的下一页内容时出现问题,请检查!', e, 'URL:' + url, '最终 URL:' + response.finalUrl, '返回状态:' + response.statusText, '返回内容:' + 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; @@ -2015,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; // 恢复翻页 @@ -2220,7 +2113,7 @@ function: { // 通用型获取下一页地址(从 元素 中获取页码)该函数用于规则中调用(fun.getNextE() 这样) function getNextE(css) { if (!css) { // 考虑到可能被非 nextL 规则内调用,所以还是需要做一个判断 - if (typeof curSite.pager.nextL == 'string' && curSite.pager.nextL.match(/^js;/) === null) {css = curSite.pager.nextL;} else {return '';} + if (typeof curSite.pager.nextL == 'string' && curSite.pager.nextL.match(/^js;/i) === null) {css = curSite.pager.nextL;} else {return '';} } let next = getOne(css); // 获取含有下一页地址的元素 if (next && next.nodeType === 1 && next.href && next.href.slice(0,4) === 'http' && next.getAttribute('href').slice(0,1) !== '#') { // 确定元素存在且 href 是正常链接 @@ -2294,11 +2187,15 @@ function: { function getNextUPN(urlReg, reg, a, b = '', initP = '2', endP) { let nextNum = urlReg.exec(location.pathname); if (nextNum) { - nextNum = String(parseInt(nextNum[0])+1); + if (nextNum.length > 1){ // 如果正则捕获到分组(也就是正则表达式中用英文括号括起来的),那么就改为使用第一个分组(也就是正则常说的 $1)作为当前页码数字 + nextNum = String(parseInt(nextNum[1])+1); + } else { + nextNum = String(parseInt(nextNum[0])+1); + } if (endP && (parseInt(nextNum) > parseInt(endP))) return '' } else { nextNum = initP; - if (endP && (parseInt(nextNum) >= parseInt(endP))) return '' + if (endP && (parseInt(nextNum) > parseInt(endP))) return '' } let url = ''; if (location.pathname) { @@ -2315,13 +2212,13 @@ function: { } // 通用型获取下一页地址(从 URL 中获取页码,并页码+1,URL 替换 page= 参数,后三个参数可以省略) function getNextUP(pf, reg, lp = location.pathname, initP = '2', endP) { - let nextNum = getSearch(pf.replace('=','')); - if (nextNum) { - nextNum = String(parseInt(nextNum)+1); - if (endP && (parseInt(nextNum) > parseInt(endP))) return '' - } else { - nextNum = initP; - if (endP && (parseInt(nextNum) >= parseInt(endP))) return '' + let nextNum = getSearch(pf.replace('=','')); // 获取参数中的 page= 值 + if (nextNum) { // 如果参数中存在 page= + nextNum = String(parseInt(nextNum)+1); // 下一页页码就是当前页码参数值 +1 + if (endP && (parseInt(nextNum) > parseInt(endP))) return '' // 如果 endP 为真且 下一页页码 大于 endP(页码最大值)则终止 + } else { // 如果参数中不存在 page= + nextNum = initP; // 因为不存在,所以一般都代表当前是位于第 1 页,那么下一页页码就设置为初始页码(默认 2) + if (endP && (parseInt(nextNum) > parseInt(endP))) return '' // 如果 endP 为真且 下一页页码 大于 endP(页码最大值)则终止 } let url = ''; if (location.search) { @@ -2363,7 +2260,7 @@ function: { curSite.pageUrl = tempUrl; func(curSite.pageUrl); } catch (e) { - console.error('[自动无缝翻页] - 当前网页规则 "nextL" 内 JS 代码有误,请检查!', e, curSite.pager.nextL); + console.error('[自动无缝翻页] - 当前网页规则 "nextL" 内 JS 代码有误,请检查:\n', curSite.pager.nextL + '\n\n', e); } } else if (getNextE_()) { func(curSite.pageUrl); @@ -2542,7 +2439,7 @@ function: { } else if (curSite.blank === 5 || curSite.blank === 6) { // 清理 元素的点击事件 if (!pageE) pageE = getAll(curSite.pager.pageE) pageE.forEach(function (dd) { - getAllCSS('a[href]:not([target="_blank"]):not([onclick]):not([href^="#"]):not([href^="javascript:"])',dd).forEach(function (a) { + getAllCSS('a[href]:not([target="_blank"]):not([href^="#"]):not([href^="javascript:"])',dd).forEach(function (a) { if (a.href.slice(0,4) == 'http') { const clonedLink = a.cloneNode(true); // 克隆原 a 元素 clonedLink.target = '_blank'; // 通过添加 target="_blank" 属性来新标签页打开,可以解决大部分情况 @@ -2644,8 +2541,26 @@ function: { return document.title.indexOf(title) > -1; } // 判断规则中的 nextL、pageE、insertP、replaceE 元素是否存在于当前网页 - function isPager(type = 'n,p') { - const typeArr = 'n,p'.split(','); + function isPager(type) { + if (!type) { // 如果没有指定要判断的元素类型参数,那么需要设置默认值 + if (!DBSiteNow.pager) return false; // 如果连 pager 都没有,那么直接返回 false + if (DBSiteNow.pager.type === undefined || DBSiteNow.pager.type === 1 || DBSiteNow.pager.type === 3 || DBSiteNow.pager.type === 6) { // 如果是翻页模式 1 3 6,那么默认值可能是 n、p、n,p 三种 + // 判断 nextL 是不是选择器(字符串 + 非 js; 开头) + if (typeof DBSiteNow.pager.nextL == 'string' && DBSiteNow.pager.nextL.match(/^js;/i) === null) {type = 'n';} + // 判断 pageE 是否不是空 + if (DBSiteNow.pager.pageE) { + // 如果 type 是空的,说明上面 nextL 判断结果为否,那么就是 p,反之则就是 n,p + if (!type) {type = 'p';}else{type = 'n,p';} + } + } else if (DBSiteNow.pager.type === 2 || DBSiteNow.pager.type === 5) { // 如果是翻页模式 2 6,那么默认值只能是 n 一种 + // 判断 nextL 是不是选择器(字符串 + 非 js; 开头) + if (typeof DBSiteNow.pager.nextL == 'string' && DBSiteNow.pager.nextL.match(/^js;/i) === null) {type = 'n';} + } else if (DBSiteNow.pager.type === 4) { // 如果是翻页模式 4,那么是不能使用 isPager 的(因为基本上都是脚本内的函数) + return false; + } + if (!type) return false; // 如果上面的判断中 nextL 和 pageE 都为否,那么 type 就还是空的,则直接返回 false + } + const typeArr = type.split(','); for (let i = 0; i < typeArr.length; i++) { switch (typeArr[i]) { case 'n': // nextL @@ -2724,7 +2639,7 @@ function: { let customRules = customStringify(GM_getValue('menu_customRules', {})) if (customRules == '{}') customRules = '{\n \n}'; // 引导用户插入规则的位置 - let _html = `
+ let _html = `

# 自定义翻页规则(优先级最高,会覆盖同名的外置翻页规则)-【将规则插入默认的 { } 中间】

「 点击展开 查看规则示例 」(为了避免需要的时候还要找,我干脆把常用规则都一股脑塞进去了)
'); }); @@ -247,11 +326,14 @@ // Download ZIP function addDownloadZIP(target) { - let html = target.querySelector('ul[class^=List__ListBox-sc-] ul[class^=List__ListBox-sc-]>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), @@ -267,7 +349,9 @@ url = new_download_url[i][0] + href } html_clone_a.href = url - html_clone_a.setAttribute('title', new_download_url[i][2].replaceAll(' ','\n')) + html_clone_a.setAttribute('title', new_download_url[i][2].replaceAll(' ','\n') + '\n\n提示:如果不想要点击链接在前台打开空白新标签页(一闪而过影响体验),\n可以 [鼠标中键] 或 [Ctrl+鼠标左键] 点击加速链接即可在后台打开新标签页!'); + html_clone_a.setAttribute('target', '_blank'); + html_clone_a.setAttribute('rel', 'noreferrer noopener nofollow'); html_clone_span.textContent = 'Download ZIP ' + new_download_url[i][1] _html += html_clone.outerHTML } @@ -281,13 +365,13 @@ // Git Clone function addGitClone(target) { - let html = target.querySelector('input[value^="https:"]');if (!html) return + let html = target.querySelector('input[value^="https:"]:not([title])');if (!html) return let href_split = html.value.split(location.host)[1], html_parent = '
', url = '', _html = '', _gitClone = ''; - html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了) - if (html.parentElement.nextElementSibling.tagName === 'SPAN'){ - html.parentElement.nextElementSibling.textContent += ' (↑点击上面文字可复制)' + if (html.nextElementSibling) html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了) + 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 元素 @@ -312,13 +396,13 @@ // Git Clone SSH function addGitCloneSSH(target) { - let html = target.querySelector('input[value^="git@"]');if (!html) return + let html = target.querySelector('input[value^="git@"]:not([title])');if (!html) return let href_split = html.value.split(':')[1], 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 元素 @@ -350,7 +434,7 @@ } else { url = raw_url[i][0] + href2; } - _html += `${raw_url[i][1].replace(/ \d/,'')}` + _html += `${raw_url[i][1].replace(/ \d/,'')}` } if (document.querySelector('.XIU2-RF')) document.querySelectorAll('.XIU2-RF').forEach((e)=>{e.remove()}) html.insertAdjacentHTML('afterend', _html); @@ -395,7 +479,7 @@ url = raw_url[menu_rawFast][0] + href2; } - fileElm.insertAdjacentHTML('afterend', ``); + fileElm.insertAdjacentHTML('afterend', ``); // 绑定鼠标事件 trElm.onmouseover = mouseOverHandler; trElm.onmouseout = mouseOutHandler; @@ -449,7 +533,7 @@ function colorMode() { let style_Add; if (document.getElementById('XIU2-Github')) {style_Add = document.getElementById('XIU2-Github')} else {style_Add = document.createElement('style'); style_Add.id = 'XIU2-Github'; style_Add.type = 'text/css';} - backColor = '#ffffff'; fontColor = '#888888'; + let backColor = '#ffffff', fontColor = '#888888'; if (document.lastElementChild.dataset.colorMode === 'dark') { // 如果是夜间模式 if (document.lastElementChild.dataset.darkTheme === 'dark_dimmed') { @@ -467,7 +551,7 @@ } } - document.lastElementChild.appendChild(style_Add).textContent = `.XIU2-RS a {--XIU2-back-Color: ${backColor}; --XIU2-font-Color: ${fontColor};}`; + document.lastElementChild.appendChild(style_Add).textContent = `.XIU2-RS a {--XIU2-background-color: ${backColor}; --XIU2-font-color: ${fontColor};}`; } @@ -491,4 +575,4 @@ window.dispatchEvent(new Event('urlchange')) }); } -})(); +})(); \ No newline at end of file diff --git a/HTML5Volume.user.js b/HTML5Volume.user.js index 502f34cb3..1938bca0f 100644 --- a/HTML5Volume.user.js +++ b/HTML5Volume.user.js @@ -1,14 +1,14 @@ // ==UserScript== -// @name HTML5 视频音频默认音量 +// @name HTML5 Video Audio Default Volume // @name:zh-CN HTML5 视频音频默认音量 // @name:zh-TW HTML5 視訊音訊預設音量 -// @name:en HTML5 Video Audio Default Volume -// @version 1.0.3 +// @name:ru Громкость аудио-видео в формате HTML5 по умолчанию +// @version 1.0.5 // @author X.I.U -// @description 避免被一些默认 100% 音量的视频/音频吓一跳(或社死)!且支持各网站分别记住音量... +// @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% 音量的视频/音频吓一跳(或社死)!且支持各网站分别记住音量... // @description:zh-TW 避免被一些預設 100% 音量的視訊/音訊嚇一跳(或社死)!且支援各網站分別記住音量... -// @description:en Avoid being startled by some video/audio with default 100% volume! And support each website to remember the volume separately... +// @description:ru Больше не пугайтесь при просмотре видео или прослушивании аудио со стандартной громкостью 100%! Так ещё каждый веб-сайт запоминает громкость отдельно... // @match *://*/* // @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 @@ -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(); // 重新注册菜单(刷新菜单上的音量值) } -})(); \ No newline at end of file +})(); diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 4ab680d1c..2a8b2aaca 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.4.9 +// @version 1.5.2 // @author X.I.U // @description 自动签到(访问空间 +22 积分)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、回帖小尾巴、自动无缝翻页、快捷回到顶部(右键网页两侧空白处)、收起预览帖子(左键网页两侧空白处)、屏蔽投票贴、快速添加链接、屏蔽阅读权限 255 帖子、预览帖子快速回复带签名、显示是否在线、显示帖子内隐藏回复 // @match *://hostloc.com/* @@ -20,8 +20,7 @@ // @supportURL https://github.com/XIU2/UserScript // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== - -(function() { +(function () { 'use strict'; var menu_ALL = [ ['menu_autoSignIn', '自动签到(22 积分)', '自动签到', true], @@ -35,48 +34,45 @@ ['menu_delate255', '屏蔽阅读权限 255 帖子', '屏蔽阅读权限 255 帖子', true], ['menu_delatePolls', '屏蔽投票帖子', '屏蔽投票帖子', false] ], menu_ID = []; - for (let i=0;i menu_ALL.length){ // 如果菜单ID数组多于菜单数组,说明不是首次添加菜单,需要卸载所有脚本菜单 - for (let i=0;i menu_ALL.length) { // 如果菜单ID数组多于菜单数组,说明不是首次添加菜单,需要卸载所有脚本菜单 + for (let i = 0; i < menu_ID.length; i++) { GM_unregisterMenuCommand(menu_ID[i]); } } - for (let i=0;i -1) { // 帖子内 if (menu_value('menu_thread_pageLoading')) { @@ -161,6 +151,7 @@ showPosts(); // 自动显示帖子内被隐藏的回复 blockUsers('thread'); // 屏蔽用户(黑名单) onlineStatus(); // 显示是否在线 + addBlockButton(); // 添加屏蔽按钮 replyCustom('thread'); // 回复自定义 } else if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1) { // 各板块帖子列表 curSite = DBSite.forum; @@ -172,28 +163,25 @@ vfastpostDOMNodeInserted(); // 监听插入事件(预览快速回复带签名) replyCustom('forum'); // 回复自定义 if (patt_forum.test(location.pathname)) blockDOMNodeInserted(); //监听插入事件(有新的回复主题,点击查看) - }else if (location.search.indexOf('mod=guide') > -1) { // 导读帖子列表 + } else if (location.search.indexOf('mod=guide') > -1) { // 导读帖子列表 curSite = DBSite.guide; - } else if(location.pathname === '/search.php') { // 搜索结果列表 + } else if (location.pathname === '/search.php') { // 搜索结果列表 curSite = DBSite.search; blockUsers('search'); // 屏蔽用户(黑名单) - } else if(location.pathname === '/home.php' && location.search.indexOf('mod=space&do=notice&view=mypost') > -1) { // 消息(帖子/点评/提到) + } else if (location.pathname === '/home.php' && location.search.indexOf('mod=space&do=notice&view=mypost') > -1) { // 消息(帖子/点评/提到) blockUsers('notice'); // 屏蔽用户(黑名单) - } else if(location.pathname === '/home.php' && location.search.indexOf('mod=space&do=pm') > -1) { // 消息(私人聊天) + } else if (location.pathname === '/home.php' && location.search.indexOf('mod=space&do=pm') > -1) { // 消息(私人聊天) blockUsers('pm'); // 屏蔽用户(黑名单) - } else if(location.search.indexOf('mod=space') > -1 && location.search.indexOf('&view=me') > -1) { // 别人的主题/回复 + } else if (location.search.indexOf('mod=space') > -1 && location.search.indexOf('&view=me') > -1) { // 别人的主题/回复 curSite = DBSite.youreply; - } else if(location.pathname === '/forum.php' && location.search.indexOf('mod=post&action=reply') > -1 || location.pathname === '/forum.php' && location.search.indexOf('mod=post&action=newthread') > -1) { // 回复:高级回复 + } else if (location.pathname === '/forum.php' && location.search.indexOf('mod=post&action=reply') > -1 || location.pathname === '/forum.php' && location.search.indexOf('mod=post&action=newthread') > -1) { // 回复:高级回复 replyCustom('reply'); // 回复自定义 } - curSite.pageUrl = ""; // 下一页URL pageLoading(); // 自动翻页 - backToTop(); // 回到顶部(右键点击左右两侧空白处) - if(menu_value('menu_autoSignIn')) autoSignIn(); // 自动签到(访问空间 10 次 = 20 积分) + backToTop(); // 回到顶部(右键点击左右两侧空白处) + if (menu_value('menu_autoSignIn')) autoSignIn(); // 自动签到(访问空间 10 次 = 20 积分) //replyIntervalDOMNodeInserted(); // 监听插入事件(回帖间隔) - - // 自动签到(访问空间 10 次 = 20 积分 + 当天首次访问论坛 2 积分) function autoSignIn() { if (!loginStatus) return @@ -201,13 +189,13 @@ timeOld = GM_getValue('menu_signInTime'); if (!timeOld || timeOld != timeNow) { // 是新的一天 GM_setValue('menu_signInTime', timeNow); // 写入签到时间以供后续比较 - GM_notification({text: '请不要关闭/刷新本页!耐心等待 60 秒~\n在此期间可以在 "其他标签页" 浏览论坛!', timeout: 10000}); + GM_notification({ text: '请不要关闭/刷新本页!耐心等待 60 秒~\n在此期间可以在 "其他标签页" 浏览论坛!', timeout: 10000 }); let url_list = [], url = 0; // 随机生成 12 个空间地址(2 个冗余) - for(let i = 0;i < 12;i++){url_list[i] = "https://" + location.host + "/space-uid-" + Math.floor(Math.random()*(50000-10000+1)+10000) + ".html";} + for (let i = 0; i < 12; i++) { url_list[i] = "https://" + location.host + "/space-uid-" + Math.floor(Math.random() * (50000 - 10000 + 1) + 10000) + ".html"; } // 每 5 秒访问一次(避免触发网站防御机制,而且还可以适当浏览论坛) - let signIn = setInterval(function(){ + let signIn = setInterval(function () { GM_xmlhttpRequest({ url: url_list[url++], method: 'GET', @@ -217,25 +205,21 @@ if (url === 11) { // 次数够了就取消定时循环 clearInterval(signIn); console.log('[全球主机交流论坛 增强] 签到完成!'); - GM_notification({text: '签到完成!积分 +22 ~', timeout: 3500}); + GM_notification({ text: '签到完成!积分 +22 ~', timeout: 3500 }); } }, 5000); } } - - // 重新签到 function reAutoSignIn() { GM_setValue('menu_signInTime', '1970/1/1'); // 设置为比当前日期更早 location.reload(); // 刷新网页 } - - // 自定义屏蔽用户 function customBlockUsers() { let nowBlockUsers = ''; - GM_getValue('menu_customBlockUsers').forEach(function(item){nowBlockUsers += '|' + item}) - let newBlockUsers = prompt('编辑 [自定义屏蔽用户],刷新网页后生效\n(不同用户名之间使用 "|" 分隔,\n(例如:用户A|用户B|用户C,如果只有一个就不需要 "|" 了。', nowBlockUsers.replace('|','')); + GM_getValue('menu_customBlockUsers').forEach(function (item) { nowBlockUsers += '|' + item }) + let newBlockUsers = prompt('编辑 [自定义屏蔽用户],刷新网页后生效\n(不同用户名之间使用 "|" 分隔,\n(例如:用户A|用户B|用户C,如果只有一个就不需要 "|" 了。', nowBlockUsers.replace('|', '')); if (newBlockUsers === '') { GM_setValue('menu_customBlockUsers', []); registerMenuCommand(); // 重新注册脚本菜单 @@ -244,12 +228,10 @@ registerMenuCommand(); // 重新注册脚本菜单 } }; - - // 屏蔽用户 function blockUsers(type) { if (!menu_value('menu_customBlockUsers') || menu_value('menu_customBlockUsers').length < 1) return - switch(type) { + switch (type) { case 'thread': // 帖子内 blockUsers_('[id^="post_"]', 'a[href^="space-uid"]'); blockUsers_('[id^="comment_"] > div', 'a.xi2.xw1'); // 点评 @@ -269,10 +251,9 @@ blockUsers_('dl[id^="pmlist_"]', '.ptm.pm_c a[href^="space-uid"]'); break; } - function blockUsers_(list1, list2, type) { - document.querySelectorAll(list1).forEach(function(item){ // 遍历所有帖子 - menu_value('menu_customBlockUsers').forEach(function(item1){ // 遍历用户黑名单 + document.querySelectorAll(list1).forEach(function (item) { // 遍历所有帖子 + menu_value('menu_customBlockUsers').forEach(function (item1) { // 遍历用户黑名单 let itemName = item.querySelector(list2); // 寻找用户名 if (itemName) { if (type && type === 1 && itemName.textContent.split(' ')[0] === item1) { // 回复引用 @@ -286,12 +267,11 @@ }) }) } - function blockUsers_vfastpost() { let vfastpost = e => { if (e.target.nodeType == 1 && e.target.outerHTML && e.target.outerHTML.indexOf('class="fastpreview"') > -1) { - e.target.querySelectorAll('.bm_c > [id^="post_"]').forEach(function(item){ // 遍历所有回复 - menu_value('menu_customBlockUsers').forEach(function(item1){ // 遍历用户黑名单 + e.target.querySelectorAll('.bm_c > [id^="post_"]').forEach(function (item) { // 遍历所有回复 + menu_value('menu_customBlockUsers').forEach(function (item1) { // 遍历用户黑名单 let itemName = item.querySelector('a.xi2'); // 寻找用户名 if (itemName && itemName.textContent === item1) { console.log(`屏蔽用户:${item1}`); @@ -309,13 +289,11 @@ document.addEventListener('DOMNodeInserted', vfastpost); // 监听插入事件 } } - - // 自定义屏蔽关键词(帖子标题) function customBlockKeywords() { let nowBlockKeywords = ''; - GM_getValue('menu_customBlockKeywords').forEach(function(item){nowBlockKeywords += '|' + item}) - let newBlockKeywords = prompt('编辑 [自定义屏蔽关键词],刷新网页后生效\n(不同关键词之间使用 "|" 分隔,\n(例如:助力|互助|互点,如果只有一个就不需要 "|" 了。', nowBlockKeywords.replace('|','')); + GM_getValue('menu_customBlockKeywords').forEach(function (item) { nowBlockKeywords += '|' + item }) + let newBlockKeywords = prompt('编辑 [自定义屏蔽关键词],刷新网页后生效\n(不同关键词之间使用 "|" 分隔,\n(例如:助力|互助|互点,如果只有一个就不需要 "|" 了。', nowBlockKeywords.replace('|', '')); if (newBlockKeywords === '') { GM_setValue('menu_customBlockKeywords', []); registerMenuCommand(); // 重新注册脚本菜单 @@ -324,13 +302,11 @@ registerMenuCommand(); // 重新注册脚本菜单 } }; - - // 屏蔽关键词(帖子标题) function blockKeywords() { if (!menu_value('menu_customBlockKeywords') || menu_value('menu_customBlockKeywords').length < 1) return - document.querySelectorAll('[id^="normalthread_"]').forEach(function(item){ // 遍历所有帖子标题 - menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词 + document.querySelectorAll('[id^="normalthread_"]').forEach(function (item) { // 遍历所有帖子标题 + menu_value('menu_customBlockKeywords').forEach(function (item1) { // 遍历关键词 let itemName = item.querySelector('a.s.xst'); // 寻找帖子标题 if (itemName && itemName.textContent.toLowerCase().indexOf(item1.toLowerCase()) > -1) { console.log(`屏蔽关键词:[${item1}]`, `,帖子标题:[${itemName.textContent}]`); @@ -339,8 +315,6 @@ }) }) } - - // 监听插入事件(有新的回复主题,点击查看) function blockDOMNodeInserted() { let block = e => { @@ -353,8 +327,6 @@ } document.addEventListener('DOMNodeInserted', block); // 监听插入事件 } - - // 监听插入事件(预览快速回复带签名) function vfastpostDOMNodeInserted() { let vfastpost = e => { @@ -364,8 +336,6 @@ } document.addEventListener('DOMNodeInserted', vfastpost); // 监听插入事件 } - - // 自定义小尾巴内容 function customLittleTail() { let newLittleTail = prompt('编辑 [自定义小尾巴内容],刷新网页后生效(换行请使用 \\n\n提示①:记得在小尾巴前面加上几个 \\n 换行,用来分隔开回帖内容~\n提示②:建议使用 [align=right] 标签来使小尾巴居右~\n提示③:支持论坛富文本标签(建议先找个回复编辑预览好~\n示例:\\n\\n\\n\\n[align=right]第一行内容~\\n第二行内容~[/align]', GM_getValue('menu_customLittleTail')); @@ -377,11 +347,9 @@ registerMenuCommand(); // 重新注册脚本菜单 } }; - - // 回复自定义 function replyCustom(type) { - switch(type) { + switch (type) { case 'forum': // 各版块帖子列表的预览帖子 replyCustom_0(); // 预览帖子 快速回复(底部) replyCustom_1(); // 预览帖子 回复(悬浮) @@ -394,26 +362,24 @@ replyCustom_3(); break; } - function replyCustom_0() { let vfastpost = e => { if (e.target.nodeType == 1 && e.target.innerHTML && e.target.innerHTML.indexOf('id="vfastpost"') > -1) { let message = e.target.querySelector('input[name="message"]'), id = message.id.match(/\d+/g)[0]; message.parentNode.innerHTML = `` - document.getElementById(`vreplysubmit_${id}`).onclick = function(){ + document.getElementById(`vreplysubmit_${id}`).onclick = function () { if (GM_getValue('menu_customLittleTail')) document.getElementById(`vmessage_${id}`).value += GM_getValue('menu_customLittleTail').replaceAll('\\n', '\n'); } } } document.addEventListener('DOMNodeInserted', vfastpost); // 监听插入事件 } - function replyCustom_1() { let floatlayout_reply = e => { if (e.target.nodeType == 1 && e.target.innerHTML && e.target.innerHTML.indexOf('id="floatlayout_reply"') > -1) { // 快速回复(悬浮)中添加 URL 按钮 document.querySelector('#floatlayout_reply .fbld').insertAdjacentHTML('afterend', `URL`); - document.getElementById('postsubmit').onclick = function(){ + document.getElementById('postsubmit').onclick = function () { if (GM_getValue('menu_customLittleTail')) document.getElementById('postmessage').value += GM_getValue('menu_customLittleTail').replaceAll('\\n', '\n'); } } @@ -422,24 +388,20 @@ // 快速发帖(各版块帖子列表底部)中添加 URL 按钮 document.querySelector('#fastposteditor .fbld').insertAdjacentHTML('afterend', `URL`); } - function replyCustom_2() { // 帖子底部的回复框 - document.getElementById('fastpostsubmit').onclick = function(){ + document.getElementById('fastpostsubmit').onclick = function () { if (GM_getValue('menu_customLittleTail')) document.getElementById('fastpostmessage').value += GM_getValue('menu_customLittleTail').replaceAll('\\n', '\n'); } } - function replyCustom_3() { let postsubmit = document.getElementById('postsubmit'); if (postsubmit && postsubmit.textContent === '\n参与/回复主题\n' || postsubmit && postsubmit.textContent === '\n发表帖子\n') { - postsubmit.onclick = function(){ + postsubmit.onclick = function () { if (GM_getValue('menu_customLittleTail')) document.getElementById('e_textarea').value += GM_getValue('menu_customLittleTail').replaceAll('\\n', '\n'); } } } } - - // 监听插入事件(回帖间隔) /*function replyIntervalDOMNodeInserted() { let replyInterval = e => { @@ -449,72 +411,113 @@ } document.addEventListener('DOMNodeInserted', replyInterval); // 监听插入事件 }*/ - - // 自动显示帖子内被隐藏的回复 function showPosts() { - if(menu_value('menu_showhide')){ + if (menu_value('menu_showhide')) { let showposts = document.querySelector('#hiddenpoststip a'); - if (showposts){ // 如果存在 + if (showposts) { // 如果存在 showposts.click(); } } } - - // 隐藏帖子内的 [下一页] 按钮 function hidePgbtn() { document.lastChild.appendChild(document.createElement('style')).textContent = '.pgbtn {display: none;}'; } - - // 快捷回到顶部(右键左右两侧空白处) function backToTop() { - document.body.oncontextmenu = function(event){ + document.body.oncontextmenu = function (event) { if (event.target == this) { event.preventDefault(); - window.scrollTo(0,0) + window.scrollTo(0, 0) } } } - - // 收起帖子预览(左键左右两侧空白处) function collapsedNowPost() { - document.body.onclick = function(event){ + document.body.onclick = function (event) { if (event.target == this) { document.querySelectorAll('[id^="threadPreviewTR_"] .closeprev').forEach(function (el) { if (!el.parentElement.querySelector('[name="message"]') || el.parentElement.querySelector('[name="message"]').value === '' && !document.getElementById('fwin_reply')) { // 避免快速回复过程中误点收起了 let parentElement = el.parentElement.parentElement.parentElement.parentElement.parentElement, top = parentElement.offsetTop + parentElement.offsetParent.offsetTop + parentElement.offsetParent.offsetParent.offsetTop; // 元素距离顶部的高度 - if (top < document.documentElement.scrollTop) window.scrollTo(0,top) // 帖子标题在上面时才会滚动到该帖子处 + if (top < document.documentElement.scrollTop) window.scrollTo(0, top) // 帖子标题在上面时才会滚动到该帖子处 el.click() } }); } } } - - // 显示在线状态 function onlineStatus() { - document.querySelectorAll('[id^="favatar"]').forEach(function(item){ // 遍历所有帖子 + document.querySelectorAll('[id^="favatar"]').forEach(function (item) { // 遍历所有帖子 if (item.querySelector('[id^="userinfo"] > .i.y em')) { let icon = (item.querySelector('[id^="userinfo"] > .i.y em').textContent === '当前在线') ? '🌝' : '🌚'; let divStatus = document.createElement('div'); - divStatus.style = 'position: absolute;margin: -8px 0 0 8px;padding: 0 1px 1.2px;background-color: #ffffff;border-radius: 50%;'; + divStatus.style = 'position: absolute;margin: -8px 0 0 8px;padding: 0px 1px;background-color: #ffffff;border-radius: 50%;z-index: 302;'; divStatus.textContent = icon; let mochu = item.querySelector('.avatar'); - mochu.parentNode.insertBefore(divStatus,mochu); + mochu.parentNode.insertBefore(divStatus, mochu); } }) } + // 添加屏蔽按钮 + function addBlockButton() { + document.querySelectorAll('[id^="favatar"]').forEach(function (item) { // 遍历所有帖子 + let usernameLink = item.querySelector('a[href^="space-uid"]'); + if (usernameLink) { + const username = usernameLink.textContent, avatar = item.querySelector('.avatar'); + if (avatar && !avatar.parentNode.querySelector('.XIU-block-button')) { + // 创建屏蔽按钮 + let blockButton = document.createElement('div'); + blockButton.className = 'XIU-block-button'; + blockButton.title = `屏蔽用户: ${username}`; + blockButton.textContent = '🚫'; + blockButton.style.cssText = 'position: absolute;margin: -8px 0px 0px 8px;padding: 0px 0.5px;top: 0px;right: 10px;background-color: #F26C4F;border-radius: 50%;cursor: pointer;z-index: 302;box-shadow: 0 2px 4px rgba(0,0,0,0.2);transition: all 0.3s ease;'; + + // 鼠标悬停效果 + if (!document.getElementById('XIU-block-style')) { + let blockStyle = document.createElement('style'); + blockStyle.id = 'XIU-block-style'; + document.documentElement.appendChild(blockStyle).textContent = '.XIU-block-button:hover{transform: scale(1.2);background-color: #ff6666;}' + } + // 点击事件 + blockButton.addEventListener('click', function (e) { + e.preventDefault(); + e.stopPropagation(); + + if (confirm(`确定要将用户 "${username}" 添加到黑名单吗?\n添加后该用户发布的任何内容都会被屏蔽`)) { + let blockList = GM_getValue('menu_customBlockUsers') || []; + if (!blockList.includes(username)) { + blockList.push(username); + GM_setValue('menu_customBlockUsers', blockList); + GM_notification({ text: `已将用户 "${username}" 添加到黑名单!\n刷新页面后生效。`, timeout: 3000 }); + + // 立即隐藏当前用户的帖子 + let postElement = item.closest('[id^="post_"]'); + if (postElement) { + postElement.style.opacity = '0.5'; + postElement.style.transition = 'opacity 0.5s ease'; + setTimeout(() => { postElement.hidden = true; }, 500); + } + } else { + GM_notification({ text: `用户 "${username}" 已在黑名单中!`, timeout: 2000 }); + } + } + }); + // 将按钮添加到头像旁边 + avatar.parentNode.style.position = 'relative'; + avatar.parentNode.appendChild(blockButton); + } + } + }); + } // 屏蔽阅读权限 255 的帖子 function delate255() { if (!menu_value('menu_delate255')) return - if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1){ + if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1) { document.querySelectorAll('tbody[id^="normalthread_"] .xw1').forEach(function (_this) { if (_this.textContent === '255') { _this.parentNode.parentNode.parentNode.hidden = true; @@ -522,32 +525,28 @@ }) } } - - // 屏蔽投票贴 function delatePolls() { if (!menu_value('menu_delatePolls')) return - if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1){ + if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1) { document.querySelectorAll('tbody[id^="normalthread_"] .icn>a>img[alt="投票"]').forEach(function (_this) { - _this.parentNode.parentNode.parentNode.parentNode.hidden = true; + _this.parentNode.parentNode.parentNode.parentNode.hidden = true; }) } } - - // 自动翻页 function pageLoading() { if (!menu_value('menu_pageLoading')) return - if (curSite.SiteTypeID > 0){ + if (curSite.SiteTypeID > 0) { windowScroll(function (direction, e) { if (direction === 'down') { // 下滑才准备翻页 let scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop; if (document.documentElement.scrollHeight <= document.documentElement.clientHeight + scrollTop + 999) { if (curSite.SiteTypeID === SiteType.FORUM) { // 如果是各版块帖子列表则直接点下一页就行了 let autopbn = document.querySelector('#autopbn'); - if (autopbn && autopbn.textContent === "下一页 »"){ // 如果已经在加载中了,就忽略 + if (autopbn && autopbn.textContent === "下一页 »") { // 如果已经在加载中了,就忽略 autopbn.click(); - let timer = setInterval(function(){ // 在下一页加载完成后 + let timer = setInterval(function () { // 在下一页加载完成后 if (document.querySelector('#autopbn').textContent === '下一页 »') { delate255(); // 屏蔽 255 权限帖子 delatePolls(); // 屏蔽投票贴子 @@ -565,12 +564,10 @@ }); } } - - // 滚动条事件 function windowScroll(fn1) { var beforeScrollTop = document.documentElement.scrollTop, - fn = fn1 || function () {}; + fn = fn1 || function () { }; setTimeout(function () { // 延时执行,避免刚载入到页面就触发翻页事件 window.addEventListener('scroll', function (e) { var afterScrollTop = document.documentElement.scrollTop, @@ -581,31 +578,29 @@ }, false); }, 1000) } - - // 修改自 https://greasyfork.org/scripts/14178 , https://github.com/machsix/Super-preloader var ShowPager = { getFullHref: function (e) { - if (e != null && e.nodeType === 1 && e.href && e.href.slice(0,4) === 'http') return e.href; + if (e != null && e.nodeType === 1 && e.href && e.href.slice(0, 4) === 'http') return e.href; return ''; }, createDocumentByString: function (e) { if (e) { if ('HTML' !== document.documentElement.nodeName) return (new DOMParser).parseFromString(e, 'application/xhtml+xml'); var t; - try { t = (new DOMParser).parseFromString(e, 'text/html');} catch (e) {} + try { t = (new DOMParser).parseFromString(e, 'text/html'); } catch (e) { } if (t) return t; if (document.implementation.createHTMLDocument) { t = document.implementation.createHTMLDocument('ADocument'); } else { - try {((t = document.cloneNode(!1)).appendChild(t.importNode(document.documentElement, !1)), t.documentElement.appendChild(t.createElement('head')), t.documentElement.appendChild(t.createElement('body')));} catch (e) {} + try { ((t = document.cloneNode(!1)).appendChild(t.importNode(document.documentElement, !1)), t.documentElement.appendChild(t.createElement('head')), t.documentElement.appendChild(t.createElement('body'))); } catch (e) { } } if (t) { var r = document.createRange(), n = r.createContextualFragment(e); r.selectNodeContents(document.body); t.body.appendChild(n); - for (var a, o = { TITLE: !0, META: !0, LINK: !0, STYLE: !0, BASE: !0}, i = t.body, s = i.childNodes, c = s.length - 1; c >= 0; c--) o[(a = s[c]).nodeName] && i.removeChild(a); + for (var a, o = { TITLE: !0, META: !0, LINK: !0, STYLE: !0, BASE: !0 }, i = t.body, s = i.childNodes, c = s.length - 1; c >= 0; c--) o[(a = s[c]).nodeName] && i.removeChild(a); return t; } } else console.error('没有找到要转成 DOM 的字符串'); @@ -614,8 +609,8 @@ if (curSite.pager) { let curPageEle = document.querySelector(curSite.pager.nextLink); var url = this.getFullHref(curPageEle); - if(url === '') return; - if(curSite.pageUrl === url) return;// 不会重复加载相同的页面 + if (url === '') return; + if (curSite.pageUrl === url) return;// 不会重复加载相同的页面 curSite.pageUrl = url; // 读取下一页的数据 curSite.pager.startFilter && curSite.pager.startFilter(); @@ -632,9 +627,12 @@ let addTo = "beforeend"; if (curSite.pager.HT_insert[1] == 1) addTo = 'beforebegin'; // 插入新页面元素 - pageElems.forEach(function (one) {toElement.insertAdjacentElement(addTo, one);}); + pageElems.forEach(function (one) { toElement.insertAdjacentElement(addTo, one); }); // 屏蔽用户(黑名单) - if (patt_thread.test(location.pathname) || location.search.indexOf('mod=viewthread') > -1) {blockUsers('thread');} else if (location.pathname === '/search.php') {blockUsers('search');} + if (patt_thread.test(location.pathname) || location.search.indexOf('mod=viewthread') > -1) { + blockUsers('thread'); + addBlockButton(); // 添加屏蔽按钮 + } else if (location.pathname === '/search.php') { blockUsers('search'); } delate255(); // 屏蔽 255 权限帖子 delatePolls(); // 屏蔽投票贴子 // 替换待替换元素 diff --git a/Lanzou-Enhanced.user.js b/Lanzou-Enhanced.user.js index f0a30b9ef..ed8e63cd4 100644 --- a/Lanzou-Enhanced.user.js +++ b/Lanzou-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 蓝奏云网盘增强 -// @version 1.5.6 +// @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/* @@ -347,10 +348,10 @@ if (iframe) { // 只有找到 iframe 框架时才会继续运行脚本 iframe = iframe.contentWindow; let timer = setInterval(function(){ - if (iframe.document.querySelector('.load>[href]')) { - //iframe.document.querySelector('.load>a[href]').target = '_top' - //iframe.document.querySelector('.load>a[href]').click(); - GM_openInTab(iframe.document.querySelector('.load>a[href]').href, {active: false, insert: true, setParent: false}); // 后台打开 + if (iframe.document.querySelector('.load [href]')) { + //iframe.document.querySelector('.load a[href]').target = '_top' + //iframe.document.querySelector('.load a[href]').click(); + GM_openInTab(iframe.document.querySelector('.load a[href]').href, {active: false, insert: true, setParent: false}); // 后台打开 clearInterval(timer); // 关闭该后台标签页 if (GM_info.scriptHandler === 'Violentmonkey') { // Violentmonkey 需要延迟一会儿 diff --git a/Ping.Sx-Enhanced.user.js b/Ping.Sx-Enhanced.user.js index a61f47d07..8337be3b5 100644 --- a/Ping.Sx-Enhanced.user.js +++ b/Ping.Sx-Enhanced.user.js @@ -1,8 +1,12 @@ // ==UserScript== -// @name Ping.Sx 增强 +// @name Ping.Sx enhancement +// @name:zh-CN Ping.Sx 增强 +// @name:zh-TW Ping.Sx 增強 // @version 1.0.3 // @author X.I.U -// @description 一键复制所有 IP、清理 IP 链接(点击复制而不是跳转)、快捷回到顶部(右键两侧空白处) +// @description Copy all IPs with one click, clean IP links (click Copy instead of Jump), and quickly go back to the top (blank space on both sides of the right click). +// @description:zh-CN 一键复制所有 IP、清理 IP 链接(点击复制而不是跳转)、快捷回到顶部(右键两侧空白处) +// @description:zh-TW 一鍵複製所有 IP、清理 IP 鏈接(點擊複製而不是跳轉)、快捷回到頂部(右鍵兩側空白處) // @match https://ping.sx/ping* // @match https://ping.sx/dig* // @match https://ping.sx/check-port* diff --git a/README.md b/README.md index eb2440bd5..d59032f38 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ ## 脚本列表 -> _详细的**脚本介绍、使用说明、截图演示**等信息,请点击 **\[安装\]** 前往 GreasyFork 查看~_ +> _详细的**脚本介绍、使用说明、截图演示**等信息,请点击 **`[安装]`** 查看~(或去本项目 [Wiki](https://github.com/XIU2/UserScript/wiki) 查看_ | | 脚本名称 | 脚本功能 | 安装 \| 备用 | | :----: | :---- | :---- | :----: | @@ -33,7 +33,7 @@ | [](https://www.52pojie.cn) | **吾爱破解论坛 美化** | 精简多余内容、样式优化 | **[安装](https://greasyfork.org/zh-CN/scripts/412681)** \| **[备用](https://bitbucket.org/xiu2/userscript/raw/master/52pojie-Beautification.user.js)** | | [](https://www.52pojie.cn) | **吾爱破解论坛 增强** | **自动签到**、自动无缝翻页、屏蔽导读悬赏贴 (最新发表页)... | **[安装](https://greasyfork.org/zh-CN/scripts/412680)** \| **[备用](https://bitbucket.org/xiu2/userscript/raw/master/52pojie-Enhanced.user.js)** | | [](https://hostloc.com) | **全球主机交流论坛 增强 \*** | **自动访问空间(22积分)、屏蔽用户**、屏蔽关键词、自动翻... | **[安装](https://greasyfork.org/zh-CN/scripts/414005)** \| **[备用](https://bitbucket.org/xiu2/userscript/raw/master/Hostloc-Enhanced.user.js)** | -| [](https://store.steampowered.com) | **Steam 创意工坊大图 修复** | 修复 Steam 创意工坊预览大图无法显示的问题 | **[安装](https://bitbucket.org/xiu2/userscript/raw/master/SteamWorkshopImageRepair.user.js)** \| **[备用](https://bitbucket.org/xiu2/userscript/raw/master/SteamWorkshopImageRepair.user.js)** | +| [](https://store.steampowered.com) | **Steam 创意工坊大图 修复** | 修复 Steam 创意工坊预览大图无法显示的问题 | **[安装](https://github.com/XIU2/UserScript/wiki/Steam-%E5%88%9B%E6%84%8F%E5%B7%A5%E5%9D%8A%E5%A4%A7%E5%9B%BE-%E4%BF%AE%E5%A4%8D)** \| **[备用](https://bitbucket.org/xiu2/userscript/raw/master/SteamWorkshopImageRepair.user.js)** | | [](https://github.com/XIU2) | **HTML5 视频音频默认音量** | 避免被 100% 音量**吓一跳**!且支持各网站分别记住音量... | **[安装](https://greasyfork.org/zh-CN/scripts/438400)** \| **[备用](https://bitbucket.org/xiu2/userscript/raw/master/HTML5Volume.user.js)** | | [](https://github.com/XIU2) | **右键滚动条回到顶部** | 鼠标**右键**网页右侧的**滚动条**即可**回到顶部** | **[安装](https://greasyfork.org/zh-CN/scripts/506959)** \| **[备用](https://bitbucket.org/xiu2/userscript/raw/master/RightClick_ScrollBar_BackToTop.user.js)** | | [](https://github.com/XIU2) | **新标签页打开链接 \*** | 将网页中所有链接改为**新标签页打开**(可能存在兼容问题 | **[安装](https://greasyfork.org/zh-CN/scripts/429714)** \| **[备用](https://bitbucket.org/xiu2/userscript/raw/master/TargetBlank.user.js)** | @@ -49,10 +49,10 @@ ## 如何安装/使用脚本? -要使用任何脚本,首先需要浏览器安装 **Tampermonkey 脚本管理器扩展([Chrome](https://pan.lanpw.com/b073l8d1e)** / **[Firefox](https://addons.mozilla.org/firefox/addon/tampermonkey/)** / **[Edge](https://microsoftedge.microsoft.com/addons/detail/tampermonkey/iikmkjmpaadaobahmlepeloendndfphd?hl=zh-CN))。** +要使用任何脚本,首先需要浏览器安装 **Tampermonkey 脚本管理器扩展([Chrome](https://xiu.lanzoub.com/b073l8d1e)** / **[Firefox](https://addons.mozilla.org/firefox/addon/tampermonkey/)** / **[Edge](https://microsoftedge.microsoft.com/addons/detail/tampermonkey/iikmkjmpaadaobahmlepeloendndfphd?hl=zh-CN))。** -- 点击表格 **\[安装\]** 进入 GreasyFork 网页,点击 **\[安装脚本\]** 后弹出扩展提示,再点击 **\[安装\]** 即可。 -- 如果 GreasyFork 访问速度太慢,可以选择点击 **\[备用\]** 后弹出扩展提示,再去点击 **\[安装\]** 即可。 +- 点击表格 **`[安装]`** 进入脚本介绍页,点击 **`[安装此脚本]`** 后弹出扩展提示,再点击 **`[安装]`** 即可。 +- 如果 GreasyFork 访问速度太慢,可以选择点击 **`[备用]`** 后弹出扩展提示,再去点击 **`[安装]`** 即可。 > [!IMPORTANT] > - _其他基于 **Chromium** 内核的浏览器(如国内套皮浏览器)一般都可以使用 Chrome 扩展。_ @@ -68,7 +68,7 @@ Tampermonkey 为了顺应 Chrome 的 Manifest V3 要求,在 v5.0.0 版本中修改了 CSP 相关选项的默认值。 你只需要去 Tampermonkey 设置中,先把最顶端的第一个选项 `配置模式:` 默认的 `新手` 改为 `高级`。 -然后翻到下面的 `安全` 选项区域,找到 `修改内容安全策略(CSP)头信息:` 把默认的 `自动` 改为 **`是` 或 `全部移除`** 并点击下面一点的 `保存` 按钮即可解决。 +然后翻到下面的 `安全` 选项区域,找到 `修改内容安全策略(CSP)头信息:` 把默认的 `自动` 改为 **`全部移除`** 并点击下面一点的 `保存` 按钮即可解决。 **** @@ -78,12 +78,22 @@ Tampermonkey 为了顺应 Chrome 的 Manifest V3 要求,在 v5.0.0 版本中 **** -## 赞赏支持 +## 新版本 Chrome 系浏览器无法运行任何脚本? + +新版本需要在**扩展管理**界面 Tampermonkey(篡改猴) 详情中**启用 `允许运行用户脚本`** 才能正常运行脚本! + +**** + +## 如果脚本帮到你的话就 "打赏" 一下吧~🎉✨ ![微信赞赏](https://github.com/XIU2/XIU2/blob/master/img/zs-01.png)![支付宝赞赏](https://github.com/XIU2/XIU2/blob/master/img/zs-02.png) **** +## Sponsor + +Powered by DartNode + ## License The GPL-3.0 License. \ No newline at end of file diff --git a/RightClick_ScrollBar_BackToTop.user.js b/RightClick_ScrollBar_BackToTop.user.js index 23a753be2..9b0d6da22 100644 --- a/RightClick_ScrollBar_BackToTop.user.js +++ b/RightClick_ScrollBar_BackToTop.user.js @@ -2,13 +2,13 @@ // @name Right click scroll bar back to top // @name:zh-CN 右键滚动条回到顶部 // @name:zh-TW 右鍵滾動條回到頂部 -// @name:en Right click scroll bar back to top +// @name:ru ПКМ по полоске прокрутки для перехода вверх // @version 1.0.0 // @author X.I.U // @description Right-click the scroll bar on the right side of the webpage to return to the top // @description:zh-CN 鼠标右键网页右侧的滚动条即可回到顶部 // @description:zh-TW 鼠標右鍵網頁右側的滾動條即可回到頂部 -// @description:en Right-click the scroll bar on the right side of the webpage to return to the top +// @description:ru Щёлкните правой кнопкой по полосе прокрутки в правой части веб-страницы, чтобы вернуться наверх // @match *://*/* // @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 none @@ -61,4 +61,4 @@ return scrollBarWidth; // 返回滚动条宽度 } -})(); \ No newline at end of file +})(); diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index fdc846182..584671e36 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎美化 -// @version 1.5.12 +// @version 1.5.20 // @author X.I.U // @description 宽屏显示、暗黑模式(4种)、暗黑模式跟随浏览器、屏蔽首页活动广告、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏 // @match *://www.zhihu.com/* @@ -44,6 +44,8 @@ } registerMenuCommand(); addStyle(); + // 向下翻时自动隐藏顶栏 + if (menu_value('menu_hideTitle')) setTimeout(hideTitle, 2000); // 注册脚本菜单 function registerMenuCommand() { @@ -138,8 +140,10 @@ .zhihuE_SettingRoot .zhihuE_SettingHeader {padding: 10px 20px;color: #fff;font-weight: bold;background-color: #3994ff;border-radius: 3px 3px 0 0;} .zhihuE_SettingRoot .zhihuE_SettingMain {padding: 10px 20px;border-radius: 0 0 3px 3px;} .zhihuE_SettingHeader span {float: right;cursor: pointer;} -.zhihuE_SettingMain input {margin: 10px 6px 10px 0;cursor: pointer;vertical-align:middle} -.zhihuE_SettingMain label {margin-right: 20px;user-select: none;cursor: pointer;vertical-align:middle} +.zhihuE_SettingMain input {margin: 10px 6px 10px 0;vertical-align:middle;} +.zhihuE_SettingMain input[type=text] {margin: 5px 6px 5px 0;padding-block: 0;} +.zhihuE_SettingMain input[name=zhihuE_Setting_Checkbox] {cursor: pointer;} +.zhihuE_SettingMain label {margin-right: 20px;user-select: none;cursor: pointer;vertical-align:middle;} .zhihuE_SettingMain hr {border: 0.5px solid #f4f4f4;} [data-theme="dark"] .zhihuE_SettingRoot {color: #adbac7;background-color: #343A44;} [data-theme="dark"] .zhihuE_SettingHeader {color: #d0d0d0;background-color: #2D333B;} @@ -150,7 +154,7 @@ if (line) _br = '
' for (let i=0; i${menu[i][2]}:${_br}` + _html += `${_br}` } else if (GM_getValue(menu[i][0])) { _html += `${_br}` } else { @@ -160,15 +164,20 @@ _html += `
` document.body.insertAdjacentHTML('beforeend', _html); // 插入网页末尾 setTimeout(function() { // 延迟 100 毫秒,避免太快 + const doc = document.querySelector('.zhihuE_SettingBackdrop_1'); + if (!doc) return // 关闭按钮 点击事件 - document.querySelector('.zhihuE_SettingClose').onclick = function(){this.parentElement.parentElement.parentElement.remove();document.querySelector('.zhihuE_SettingStyle').remove();} + doc.querySelector('.zhihuE_SettingClose').onclick = function(){this.parentElement.parentElement.parentElement.remove();document.querySelector('.zhihuE_SettingStyle').remove();} // 点击周围空白处 = 点击关闭按钮 - document.querySelector('.zhihuE_SettingBackdrop_2').onclick = function(event){if (event.target == this) {document.querySelector('.zhihuE_SettingClose').click();};} + doc.querySelector('.zhihuE_SettingBackdrop_2').onclick = function(event){if (event.target == this) {document.querySelector('.zhihuE_SettingClose').click();};} // 复选框 点击事件 - document.getElementsByName('zhihuE_Setting_Checkbox').forEach(function (checkBox) { + doc.querySelectorAll('input[name=zhihuE_Setting_Checkbox]').forEach(function (checkBox) { checkBox.addEventListener('click', function(){if (this.checked) {GM_setValue(this.value, true);} else {GM_setValue(this.value, false);}}); }) - document.getElementsByName('menu_widescreenDisplayWidth')[0].onchange = function(){GM_setValue(this.name, this.value);}; + // 输入框 变化事件 + doc.querySelectorAll('input[type=text]').forEach(function (checkBox) { + checkBox.onchange = function(){GM_setValue(this.name, this.value);}; + }) }, 100) } @@ -203,41 +212,52 @@ html[data-theme=light] .AppHeader-notifications:not([aria-label=通知])>div:fir `, style_widescreenDisplayIndex = `/* 宽屏显示 - 首页 */ .Topstory-mainColumn, .QuestionWaiting-mainColumn {width: inherit !important;} -.Topstory-mainColumn+div,[data-za-detail-view-path-module="RightSideBar"] {display: none !important;} +.Topstory-mainColumn~div,[data-za-detail-view-path-module="RightSideBar"] {display: none !important;} .Topstory-container {width: ${GM_getValue('menu_widescreenDisplayWidth')}px;} +@media only screen and (max-width: ${Number(GM_getValue('menu_widescreenDisplayWidth'))+50}px) {.Topstory-container {width: 97% !important;}} `, style_widescreenDisplayQuestion = `/* 宽屏显示 - 问题页 */ .Question-mainColumn, .ListShortcut, .QuestionWaiting-mainColumn {width: inherit !important;} .Question-mainColumn+div,[data-za-detail-view-path-module="RightSideBar"], .Question-sideColumn, .GlobalSideBar {display: none !important;} .QuestionWaiting-mainColumn {margin-right: 0 !important;} .Question-main {width: ${GM_getValue('menu_widescreenDisplayWidth')}px;} +@media only screen and (max-width: ${Number(GM_getValue('menu_widescreenDisplayWidth'))+50}px) {.Question-main {width: auto !important;}} +@media only screen and (max-width: ${GM_getValue('menu_widescreenDisplayWidth')-100}px) {.Question-main {width: 98.5% !important;}} .AuthorInfo {max-width: 100% !important;} `, style_widescreenDisplaySearch = `/* 宽屏显示 - 搜索页 */ .SearchMain, .ContentLayout-mainColumn, .Club-mainColumn, .Post-mainColumn, [data-za-detail-view-path-module=TopicItem]>div:first-child {width: inherit !important;} .SearchMain+div, .ContentLayout-sideColumn, .Card.QuestionHeaderTopicMeta, .ClubSideBar, [data-za-detail-view-path-module=TopicItem]>div:not(:first-child) {display: none !important;} .Search-container, .ContentLayout, .Club-container, .Post-container, [data-za-detail-view-path-module=TopicItem] {width: ${GM_getValue('menu_widescreenDisplayWidth')}px;} +@media only screen and (max-width: ${Number(GM_getValue('menu_widescreenDisplayWidth'))+50}px) {.Search-container, .ContentLayout, .Club-container, .Post-container, [data-za-detail-view-path-module=TopicItem] {width: 97.5% !important;}} `, style_widescreenDisplayCollection = `/* 宽屏显示 - 收藏页 */ .CollectionsDetailPage-mainColumn {width: inherit !important;} -.CollectionsDetailPage-mainColumn+div, {display: none !important;} +.CollectionsDetailPage-mainColumn+div {display: none !important;} .CollectionsDetailPage {width: ${GM_getValue('menu_widescreenDisplayWidth')}px;} +@media only screen and (max-width: ${Number(GM_getValue('menu_widescreenDisplayWidth'))+50}px) {.CollectionsDetailPage {width: 98.5% !important;}} `, style_widescreenDisplayPost = `/* 宽屏显示 - 文章页 */ +.Post-content {min-width: auto !important;} .Post-SideActions {left: calc(10vw) !important;} -.Post-NormalMain .Post-Header, .Post-NormalMain>div, .Post-NormalSub>div {width: ${GM_getValue('menu_widescreenDisplayWidth')}px !important;} +.Post-Row-Content-right {display: none !important;} +.Post-Row-Content, .Post-Row-Content-left, .RichContent-actions {width: ${GM_getValue('menu_widescreenDisplayWidth')}px !important;} +@media only screen and (max-width: ${Number(GM_getValue('menu_widescreenDisplayWidth'))+50}px) {.Post-Row-Content, .Post-Row-Content-left, .RichContent-actions {width: auto !important;}} +@media only screen and (max-width: ${GM_getValue('menu_widescreenDisplayWidth')-100}px) {.Post-Row-Content, .Post-Row-Content-left, .RichContent-actions {width: 98% !important;}} `, style_widescreenDisplayPeople = `/* 宽屏显示 - 用户主页 */ .Profile-mainColumn {width: inherit !important;} .Profile-mainColumn+div,[data-za-module="RightSideBar"],.Profile-sideColumn {display: none !important;} .Profile-main, #ProfileHeader {width: ${GM_getValue('menu_widescreenDisplayWidth')}px !important;} +@media only screen and (max-width: ${Number(GM_getValue('menu_widescreenDisplayWidth'))+50}px) {.Profile-main, #ProfileHeader {width: auto !important;}} +@media only screen and (max-width: ${GM_getValue('menu_widescreenDisplayWidth')-100}px) {.Profile-main, #ProfileHeader {width: 98.5% !important;}} `, style_2 = `/* 隐藏在各列表中查看文章时开头显示的大图,不影响文章、专栏页面 */ .RichContent img.ArticleItem-image {display: none !important;} `, - style_3 = `/* 向下翻时自动隐藏顶栏*/ -header.is-hidden {display: none;} -`, +// style_3 = `/* 向下翻时自动隐藏顶栏*/ +//header.is-hidden {display: none;} +//`, style_4 = `/* 调整图片最大高度 */ .ztext .content_image, .ztext .origin_image, .GifPlayer img {max-height: 500px !important;width: auto !important;} `, @@ -273,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;} @@ -308,7 +331,7 @@ html[data-theme=dark] img.UserCover-image, html[data-theme=dark] img.TitleImage /* 其他图片 */ html[data-theme=dark] img {opacity: 0.8 !important;} /* GIF 动图、放大图除外 */ -html[data-theme=dark] .GifPlayer img, html[data-theme=dark] .ImageView-img {opacity: 1 !important;} +html[data-theme=dark] .GifPlayer img, html[data-theme=dark] .ImageView-img, html[data-theme=dark]>body>img {opacity: 1 !important;} /* 边框 */ html[data-theme=dark] .Topbar, html[data-theme=dark] .CommentsV2-footer, html[data-theme=dark] .Topstory-mainColumnCard .Card:not(.Topstory-tabCard), html[data-theme=dark] .NestComment:not(:last-child):after, html[data-theme=dark] .NestComment--rootComment:after, html[data-theme=dark] .NestComment .NestComment--child:after, html[data-theme=dark] .NestComment .NestComment--child:after, html[data-theme=dark] .CommentsV2-replyNum, html[data-theme=dark] .CommentItemV2:not(:first-child):after, html[data-theme=dark] .Tabs, html[data-theme=dark] .Popover-arrow:after, html[data-theme=dark] .SelfCollectionItem-innerContainer, html[data-theme=dark] .CollectionDetailPageItem-innerContainer {border-bottom: 1px solid #282d35 !important;} @@ -334,7 +357,7 @@ html {scrollbar-width: thin; scrollbar-color: #3f4752 #22272e;} .MessagesBox, .Messages-list, .PushNotifications-list, .CommentListV2, .ChatListGroup-SectionContent, .ChatSideBar-Search-ResultListWrap {scrollbar-width: thin; scrollbar-color: #3f4752 #2D333B;} /* 背景颜色 - 专栏/文章 */ -html[data-theme=dark] .WhiteBg-body, html[data-theme=dark] .Post-content {background: #22272E !important;} +html[data-theme=dark] .WhiteBg-body, html[data-theme=dark] .Post-content, html[data-theme=dark] .Post-Row-Content .Post-Row-Content-left {background: #22272E !important;} html[data-theme=dark] .ColumnPageHeader, html[data-theme=dark] .BottomInfo {background: #1c2129 !important;} /* 按钮颜色 */ @@ -350,6 +373,9 @@ html[data-theme=dark] .Reward-TipjarDialog-amountList .Button--red, html[data-th /* 赞同 */ html[data-theme=dark] .VoteButton.is-active {color: #d6edff !important;} + +/* 创作中心 - 分析图表 */ +html[data-theme=dark] .CreatorSection-body .AnalyticsChart text {fill: #adbac7 !important;} `, style_darkMode_1_x = `/* 问题日志页 */ html[data-theme=dark] .zu-top {background: #2D333B !important;border: none !important;} @@ -460,8 +486,6 @@ html {filter: brightness(65%) sepia(30%) !important; background-image: url();} if (menu_value('menu_picHeight')) style += style_4; // 隐藏文章开头大图 if (menu_value('menu_postimg')) style += style_2; - // 向下翻时自动隐藏顶栏 - if (menu_value('menu_hideTitle')) style += style_3; if (document.lastChild) { document.lastChild.appendChild(style_Add).textContent = style; @@ -475,6 +499,27 @@ html {filter: brightness(65%) sepia(30%) !important; background-image: url();} } } + function hideTitle() { + // 获取需要控制的元素 + const floatingElement = document.getElementsByTagName('header')[0]; + let beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop, + scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop, + scrollHeight = window.innerHeight || document.documentElement.clientHeight + + window.addEventListener('scroll', function (e) { + var afterScrollTop = document.documentElement.scrollTop || document.body.scrollTop, + delta = afterScrollTop - beforeScrollTop; + //console.log(delta,floatingElement) + if (delta == 0) return false; + if (delta > 0) {// 向下滚动 隐藏 + floatingElement.hidden = true; + } else { + // 向上滚动 显示 + floatingElement.hidden = false; + } + beforeScrollTop = afterScrollTop; + }, false); + } // 获取知乎 Cookie 中的主题类型 function getTheme() { diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index 4e9c625d7..48c150978 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -1,13 +1,14 @@ // ==UserScript== -// @name 知乎增强 +// @name Zhihu enhancement // @name:zh-CN 知乎增强 // @name:zh-TW 知乎增強 -// @name:en Zhihu enhancement -// @version 2.3.10 +// @name:ru Улучшение Zhihu +// @version 2.3.28 // @author X.I.U -// @description 屏蔽指定类别(视频、盐选、文章、想法、关注[赞同了XX/关注了XX]等等)、屏蔽用户、屏蔽关键词、默认收起回答、快捷收起回答/评论(左键两侧)、快捷回到顶部(右键两侧)、区分问题文章、移除高亮链接、净化搜索热门、净化标题消息、展开问题描述、显示问题作者、默认高清原图(无水印)、置顶显示时间、完整问题时间、直达问题按钮、默认站外直链... -// @description:zh-TW 屏蔽指定類別(視頻、鹽選、文章、想法、關注[贊同了XX/關注了XX]等等)、屏蔽用戶、屏蔽關鍵詞、默認收起回答、快捷收起回答/評論、快捷回到頂部、區分問題文章、移除高亮鏈接、默認高清原圖(無水印)、默認站外直鏈... -// @description:en A more personalized Zhihu experience~ +// @description A more personalized Zhihu experience~ +// @description:zh-CN 移除登录弹窗、屏蔽指定类别(视频、盐选、文章、想法、关注[赞同/关注了XX]等)、屏蔽低赞/低评回答、屏蔽用户、屏蔽关键词、默认收起回答、快捷收起回答/评论(左键两侧)、快捷回到顶部(右键两侧)、区分问题文章、移除高亮链接、净化搜索热门、净化标题消息、展开问题描述、显示问题作者、默认高清原图(无水印)、置顶显示时间、完整问题时间、直达问题按钮、默认站外直链... +// @description:zh-TW 移除登錄彈窗、屏蔽指定類別(視頻、鹽選、文章、想法、關注[贊同/關注了XX]等)、屏蔽低贊/低評回答、屏蔽用戶、屏蔽關鍵詞、默認收起回答、快捷收起回答/評論、快捷回到頂部、區分問題文章、移除高亮鏈接、默認高清原圖(無水印)、默認站外直鏈... +// @description:ru Более персонализированный опыт пользования сайтом Zhihu~ // @match *://www.zhihu.com/* // @match *://zhuanlan.zhihu.com/* // @exclude https://www.zhihu.com/signin* @@ -35,11 +36,19 @@ var menu_ALL = [ ['menu_collapsedAnswer', '一键收起回答/评论', '一键收起回答/评论', true], ['menu_collapsedNowAnswer', '快捷收起回答/评论 (点击两侧空白处)', '快捷收起回答/评论', true], ['menu_backToTop', '快捷回到顶部 (右键两侧空白处)', '快捷回到顶部', true], + ['menu_blockLowCount', '屏蔽低赞低评', '设置要屏蔽 低于多少赞同/评价 的回答/文章(默认不需要留空即可)
(例如设置 0 则无人赞同/评价的回答/文章会被屏蔽
(例如设置 20 则赞同/评价数量低于 20 的回答/文章会被屏蔽
(修改后,后续加载的回答/文章会立即生效,但不影响当前网页已有内容', ''], + ['menu_blockLowUpvoteCount', '最低赞同数 [首页]', '最低赞同数(首页)', ''], + ['menu_blockLowCommentCount', '最低评价数 [首页]', '最低评价数(首页)', ''], + ['menu_blockLowUpvoteCountQuestion', '最低赞同数 [问题页]', '最低赞同数(问题页)', ''], + ['menu_blockLowCommentCountQuestion', '最低评价数 [问题页]', '最低评价数(问题页)', ''], + ['menu_blockLowUpvoteCountFollow', '最低赞同数 [关注页]', '最低赞同数(关注页)', ''], + ['menu_blockLowCommentCountFollow', '最低评价数 [关注页]', '最低评价数(关注页)', ''], ['menu_blockUsers', '屏蔽指定用户', '屏蔽指定用户', true], ['menu_customBlockUsers', '自定义屏蔽用户', '自定义屏蔽用户', ['故事档案局', '盐选推荐', '盐选科普', '盐选成长计划', '知乎盐选会员', '知乎盐选创作者', '盐选心理', '盐选健康必修课', '盐选奇妙物语', '盐选生活馆', '盐选职场', '盐选文学甄选', '盐选作者小管家', '盐选博物馆', '盐选点金', '盐选测评室', '盐选科技前沿', '盐选会员精品']], ['menu_blockKeywords', '屏蔽指定关键词', '屏蔽指定关键词', true], ['menu_blockKeywordsComment', '屏蔽关键词 - 评论区', '屏蔽关键词 - 评论区', true], ['menu_customBlockKeywords', '自定义屏蔽关键词', '自定义屏蔽关键词', []], + ['menu_addSelectedBlockKeywords', '添加选中文字到屏蔽词 ↑', '添加选中文字到屏蔽词', []], ['menu_blockType', '屏蔽指定类别 (视频/文章等)', '勾选 = 屏蔽该类别的信息流', ''], ['menu_blockTypeVideo', '视频 [首页、搜索页、问题页、关注页]', '视频(首页、搜索页、问题页、关注页)', true], ['menu_blockTypeArticle', '文章 [首页、搜索页、关注页]', '文章(首页、搜索页、关注页)', false], @@ -50,6 +59,7 @@ var menu_ALL = [ ['menu_blockTypeSearch', '杂志文章、盐选专栏、相关搜索等 [搜索页]', '相关搜索、杂志、盐选等(搜索页)', false], ['menu_blockYanXuan', '盐选内容 [问题页]', '盐选内容(问题页)', false], ['menu_blockTypeLiveHot', '热榜文章、直播、广告等 [热榜]', '热榜文章、直播、广告等 [热榜]', true], + ['menu_cleanHighlightLink', '移除高亮链接 (高亮的文字链接)', '移除高亮链接', true], ['menu_cleanSearch', '净化搜索热门 (默认搜索词及热门搜索)', '净化搜索热门', false], ['menu_cleanTitles', '净化标题消息 (标题中的私信/消息)', '净化标题提醒', false], ['menu_questionRichTextMore', '展开问题描述', '展开问题描述', false], @@ -71,15 +81,22 @@ function registerMenuCommand() { } for (let i=0;i

${tips}


` if (line) _br = '
' for (let i=0; i${menu[i][1]}${_br}` + if (menu[i][0].indexOf('menu_blockLow') === 0) { + _html += `${_br}` + } else if (GM_getValue(menu[i][0])) { + _html += `${_br}` } else { - _html += `${_br}` + _html += `${_br}` } } _html += `` document.body.insertAdjacentHTML('beforeend', _html); // 插入网页末尾 setTimeout(function() { // 延迟 100 毫秒,避免太快 + const doc = document.querySelector('.zhihuE_SettingBackdrop_1'); + if (!doc) return // 关闭按钮 点击事件 - document.querySelector('.zhihuE_SettingClose').onclick = function(){this.parentElement.parentElement.parentElement.remove();document.querySelector('.zhihuE_SettingStyle').remove();} + doc.querySelector('.zhihuE_SettingClose').onclick = function(){this.parentElement.parentElement.parentElement.remove();document.querySelector('.zhihuE_SettingStyle').remove();} // 点击周围空白处 = 点击关闭按钮 - document.querySelector('.zhihuE_SettingBackdrop_2').onclick = function(event){if (event.target == this) {document.querySelector('.zhihuE_SettingClose').click();};} + doc.querySelector('.zhihuE_SettingBackdrop_2').onclick = function(event){if (event.target == this) {document.querySelector('.zhihuE_SettingClose').click();};} // 复选框 点击事件 - document.getElementsByName('zhihuE_Setting').forEach(function (checkBox) { - checkBox.addEventListener('click', function(){if (this.checked) {GM_setValue(this.value, true);} else {GM_setValue(this.value, false);}}); + doc.querySelectorAll('input[name=zhihuE_Setting_Checkbox]').forEach(function (checkBox) { + checkBox.addEventListener('click', function(){if (this.checked) {console.log('this.value',true);GM_setValue(this.value, true);} else {console.log('this.value',false);GM_setValue(this.value, false);}}); + }) + // 输入框 变化事件 + doc.querySelectorAll('input[type=text]').forEach(function (checkBox) { + checkBox.onchange = function(){GM_setValue(this.name, this.value);}; }) }, 100) } @@ -421,6 +448,72 @@ function isElementInViewport_(el) { } +// 屏蔽低赞/低评回答/文章 +function blockLowCount(type) { + switch(type) { + case 'index': + blockLowCount_('.Card.TopstoryItem.TopstoryItem-isRecommend', 'Card TopstoryItem TopstoryItem-isRecommend', 'menu_blockLowUpvoteCount', 'menu_blockLowCommentCount'); + break; + case 'follow': + blockLowCount_('.Card.TopstoryItem.TopstoryItem-isFollow', 'Card TopstoryItem TopstoryItem-isFollow', 'menu_blockLowUpvoteCountFollow', 'menu_blockLowCommentCountFollow'); + break; + case 'question': + 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){ + console.log(item1) + blockLowCount_1(item1,menuUpvote,'upvote_num'); + blockLowCount_1(item1,menuComment,'comment_num'); + }) + } + + blockLowCount_now(); + window.addEventListener('urlchange', function(){ + setTimeout(blockLowCount_now, 1000); // 网页 URL 变化后再次执行 + }) + + // 这个是监听网页插入事件,用来判断后续网页动态插入的元素 + const callback = (mutationsList, observer) => { + for (const mutation of mutationsList) { + for (const target of mutation.addedNodes) { + if (target.nodeType != 1) return + if (target.className === className2) { + blockLowCount_1(target,menuUpvote,'upvote_num'); + blockLowCount_1(target,menuComment,'comment_num'); + } + } + } + }; + const observer = new MutationObserver(callback); + observer.observe(document, { childList: true, subtree: true }); + } + + + function blockLowCount_1(item, menu, type) { + if (GM_getValue(menu)) { + 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'; + } + } + } + } +} + + + // 自定义屏蔽用户 function customBlockUsers() { let nowBlockUsers = ''; @@ -445,6 +538,9 @@ function blockUsers(type) { case 'index': blockUsers_('.Card.TopstoryItem.TopstoryItem-isRecommend', 'Card TopstoryItem TopstoryItem-isRecommend'); break; + case 'follow': + blockUsers_('.Card.TopstoryItem.TopstoryItem-isFollow', 'Card TopstoryItem TopstoryItem-isFollow'); + break; case 'question': blockUsers_question(); break; @@ -748,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 = ''; @@ -1041,7 +1193,8 @@ function findParentElement(item, className, type = false) { // 移除高亮链接 -function removeHighlightLink() { +function cleanHighlightLink() { + if (!menu_value('menu_cleanHighlightLink')) return; const callback = (mutationsList, observer) => { for (const mutation of mutationsList) { for (const target of mutation.addedNodes) { @@ -1112,6 +1265,8 @@ function addTypeTips() { let style = `font-weight: bold;font-size: 13px;padding: 1px 4px 0;border-radius: 2px;display: inline-block;vertical-align: top;margin: ${(location.pathname === '/search') ? '2' : '4'}px 4px 0 0;` document.body.appendChild(document.createElement('style')).textContent = `/* 区分问题文章 */ .AnswerItem .ContentItem-title a:not(.zhihu_e_toQuestion)::before {content:'问题';color: #f68b83;background-color: #f68b8333;${style}} +/* 针对的是部分搜索词下搜索页开头的 "最新讨论" 之类的非常规元素 */ +.HotLanding-contentItem .ContentItem[data-za-detail-view-path-module=Content] .ContentItem-title a:not(.zhihu_e_toQuestion)::before {content:'问题';color: #f68b83;background-color: #f68b8333;${style}} .TopstoryQuestionAskItem .ContentItem-title a:not(.zhihu_e_toQuestion)::before {content:'问题';color: #ff5a4e;background-color: #ff5a4e33;${style}} .ZVideoItem .ContentItem-title a::before, .ZvideoItem .ContentItem-title a::before {content:'视频';color: #00BCD4;background-color: #00BCD433;${style}} .PinItem .ContentItem-title a::before {content:'想法';color: #4CAF50;background-color: #4CAF5033;${style}} @@ -1154,7 +1309,9 @@ function addToQuestion() { titleA.innerHTML = titleA.innerHTML.replace('?', "?") } if (/answer\/\d+/.test(titleA.href)) { // 如果是指向回答的问题(而非指向纯问题的链接) - titleA.insertAdjacentHTML('afterend', `直达问题`); + const titleA_meta = titleA.parentElement.parentElement.querySelector('meta[itemprop="url"]'); // 获取该问题页地址 + if (!titleA_meta) return // 判断元素是否存在(针对的是部分搜索词下搜索页开头的 "最新讨论" 之类的非常规元素) + titleA.insertAdjacentHTML('afterend', `直达问题`); } } @@ -1177,6 +1334,38 @@ function questionRichTextMore() { if (button) button.click() } +// 移除登录弹窗 +function removeLogin() { + const removeLoginModal = (mutationsList, observer) => { + for (const mutation of mutationsList) { + for (const target of mutation.addedNodes) { + if (target.nodeType != 1) return + if (target.querySelector('.signFlowModal')) { + let button = target.querySelector('.Button.Modal-closeButton.Button--plain'); + if (button) button.click(); + } else if (getXpath('//button[text()="立即登录/注册"]',target)) { + target.remove(); + } + } + } + }; + + // 未登录时才会监听并移除登录弹窗 + if(location.hostname === 'zhuanlan.zhihu.com') { // 如果是文章页 + if (!document.querySelector('.ColumnPageHeader-profile>.AppHeader-menu')) { // 未登录 + const observer = new MutationObserver(removeLoginModal); + observer.observe(document, { childList: true, subtree: true }); + if (getXpath('//button[text()="登录/注册"]')) getXpath('//button[text()="登录/注册"]').outerHTML = ''; // [登录] 按钮跳转至登录页面 + } + } else { // 不是文章页 + if (!document.querySelector('.AppHeader-profile>.AppHeader-menu')) { // 未登录 + const observer = new MutationObserver(removeLoginModal); + observer.observe(document, { childList: true, subtree: true }); + document.lastElementChild.appendChild(document.createElement('style')).textContent = '.Question-mainColumnLogin, button.AppHeader-login {display: none !important;}'; // 屏蔽问题页中间的登录提示 + if (getXpath('//button[text()="登录/注册"]')) getXpath('//button[text()="登录/注册"]').outerHTML = ''; // [登录] 按钮跳转至登录页面 + } + } +} // 净化标题消息 function cleanTitles() { @@ -1289,7 +1478,7 @@ function getXpath(xpath, contextNode, doc = document) { // 显示问题作者 function question_author() { - if (document.querySelector('.BrandQuestionSymbol, .QuestionAuthor')) return + if (document.querySelector('.BrandQuestionSymbol, .QuestionAuthor, .SpecialQuestionAuthor')) return let qJson = JSON.parse(document.querySelector('#js-initialData').textContent).initialState.entities.questions[/\d+/.exec(location.pathname)[0]].author, html = ``; //html = `` @@ -1303,7 +1492,7 @@ function question_author() { function topTime_(css, classs) { document.querySelectorAll(css).forEach(function(_this) { let t = _this.querySelector('.ContentItem-time'); if (!t) return - if (!(t.classList.contains('full')) && t.querySelector('span') && t.querySelector('span').textContent != null) { + if (!(t.classList.contains('full')) && t.querySelector('a') && t.querySelector('a').textContent != null) { // 完整显示时间 topTime_allTime(t) // 发布时间置顶 @@ -1336,10 +1525,10 @@ function topTime_post() { // 完整显示时间 function topTime_allTime(t) { if (t.textContent.indexOf('发布于') > -1 && t.textContent.indexOf('编辑于') == -1) { - t.querySelector('span').textContent = (t.querySelector('span').dataset.tooltip); + t.querySelector('a').textContent = (t.querySelector('a').dataset.tooltip); t.classList.add('full'); } else if (t.textContent.indexOf('发布于') == -1 && t.textContent.indexOf('编辑于') > -1) { - t.querySelector('span').textContent = (t.querySelector('span').dataset.tooltip) + ' ,' + (t.querySelector('span').textContent); + t.querySelector('a').textContent = (t.querySelector('a').dataset.tooltip) + ' ,' + (t.querySelector('a').textContent); t.classList.add('full'); } } @@ -1452,49 +1641,33 @@ function blockHotOther() { block(); } +// 将关注/推荐/热榜/专栏的选项去掉默认的点击事件改成静态链接(针对首页互相切换(知乎这里切换是动态加载的),为了避免功能交叉混乱 +// 针对所有页面 +function switchHome() { + document.querySelectorAll('header.AppHeader nav').forEach((a)=>{a.outerHTML = a.outerHTML;}) +} +// 针对首页几个页面 +function switchHomeRecommend() { + document.querySelectorAll('header.AppHeader nav>a:not([target])[href="https://www.zhihu.com/"]').forEach((a)=>{a.addEventListener('click', function(e){e.preventDefault();document.cookie='tst=r; expires=Thu, 18 Dec 2099 12:00:00 GMT; domain=.zhihu.com; path=/';location.href=this.href;return false;})}) +} (function() { if (window.onurlchange === undefined) {addUrlChangeEvent();} // Tampermonkey v4.11 版本添加的 onurlchange 事件 grant,可以监控 pjax 等网页的 URL 变化 - window.addEventListener('urlchange', function(){ // 针对的是从单个回答页跳转到完整回答页时 - if (location.pathname.indexOf('question') > -1 && location.pathname.indexOf('waiting') === -1 && location.pathname.indexOf('/answer/') === -1) { // 回答页 // - setTimeout(function(){ - collapsedNowAnswer('.QuestionPage'); // 收起当前回答 + 快捷返回顶部 - collapsedNowAnswer('.Question-main'); // 收起当前回答 + 快捷返回顶部 - questionRichTextMore(); // 展开问题描述 - blockUsers('question'); // 屏蔽指定用户 - blockYanXuan(); // 屏蔽盐选内容 - }, 300); - } else if (location.pathname == '/') { // 推荐 - setTimeout(()=>{ - blockUsers('index'); // 屏蔽指定用户 - blockKeywords('index'); // 屏蔽指定关键词 - blockType(); // 屏蔽指定类别(视频/文章等) - }, 500); - } else if (location.pathname == '/hot') { // 热榜 - setTimeout(()=>{ - blockKeywords('index'); // 屏蔽指定关键词 - blockHotOther(); // 移除热播杂项 - }, 500); - } else if (location.pathname == '/follow') { // 关注 - setTimeout(()=>{ - blockKeywords('follow'); // 屏蔽指定关键词 - blockType(); // 屏蔽指定类别(视频/文章等) - blockType('follow'); // 屏蔽指定类别(赞同了XX/关注了XX等) - }, 500); - } - }) + rememberSelectedBlockKeyword(); // 记录当前选中的文字,供右键脚本菜单直接加入屏蔽词 + removeLogin(); // 移除登录弹窗,Violentmonkey 不能延迟执行这个 cleanTitles(); // 净化标题消息,不能延迟执行 // Violentmonkey 比 Tampermonkey 加载更早,会导致一些元素还没加载,因此需要延迟一会儿 // Tampermonkey 4.18.0 版本可能需要延迟一会执行 if (GM_info.scriptHandler === 'Violentmonkey' || (GM_info.scriptHandler === 'Tampermonkey' && parseFloat(GM_info.version.slice(0,4)) >= 4.18)) { - setTimeout(start, 300); + setTimeout(start, 200); } else { start(); } function start(){ - removeHighlightLink(); // 移除高亮链接 + switchHome(); // 将关注/推荐/热榜/专栏的选项去掉默认的点击事件改成静态链接(针对首页互相切换(知乎这里切换是动态加载的),为了避免功能交叉混乱 + cleanHighlightLink(); // 移除高亮链接 originalPic();directLink(); // 先立即执行一次 setInterval(originalPic,500); // 默认高清原图(无水印) setInterval(directLink, 500); // 默认站外直链 @@ -1511,6 +1684,11 @@ function blockHotOther() { collapsedNowAnswer('.QuestionPage'); // 收起当前回答 + 快捷返回顶部 collapsedNowAnswer('.Question-main'); // 收起当前回答 + 快捷返回顶部 questionRichTextMore(); // 展开问题描述 + if (location.pathname.indexOf('answer') == -1) { // 问题页而不是回答页 + blockLowCount('question'); // 屏蔽低赞/低评回答/文章 + } else { // 将回答页的的查看全部回答选项去掉默认的点击事件改成静态链接,为了避免功能交叉混乱 + document.querySelectorAll('div.Card.ViewAll>a').forEach((a)=>{a.outerHTML = a.outerHTML;}) + } blockUsers('question'); // 屏蔽指定用户 blockYanXuan(); // 屏蔽盐选内容 blockType('question'); // 屏蔽指定类别(视频/文章等) @@ -1542,8 +1720,8 @@ function blockHotOther() { } } else if (location.hostname === 'zhuanlan.zhihu.com'){ // 文章 // - backToTop('article.Post-Main.Post-NormalMain'); // 快捷返回顶部 - backToTop('div.Post-Sub.Post-NormalSub'); // 快捷返回顶部 + backToTop('.Post-content'); // 快捷返回顶部 + backToTop('.Post-Row-Content'); // 快捷返回顶部 setTimeout(topTime_post, 300); // 置顶显示时间 blockUsers(); // 屏蔽指定用户 @@ -1578,30 +1756,34 @@ function blockHotOther() { backToTop('main[role=main]'); // 快捷返回顶部 setInterval(function(){topTime_('.ContentItem.PinItem', 'ContentItem-meta')}, 300); // 置顶显示时间 - } else { // 首页 // + } else if (['/','/hot','/follow','/column-square','/ring-feeds'].indexOf(location.pathname) !== -1) { // 首页 // + 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'); // 收起当前回答 + 快捷返回顶部 - setInterval(function(){topTime_('.TopstoryItem', 'ContentItem-meta')}, 300); // 置顶显示时间 - addTypeTips(); // 区分问题文章 - addToQuestion(); // 直达问题按钮 - if (location.pathname == '/') { // 推荐 - blockUsers('index'); // 屏蔽指定用户 - blockKeywords('index'); // 屏蔽指定关键词 - blockType(); // 屏蔽指定类别(视频/文章等) - } else if (location.pathname == '/hot') { // 热榜 - blockKeywords('index'); // 屏蔽指定关键词 - blockHotOther(); // 屏蔽热榜杂项 - } else if (location.pathname == '/follow') { // 关注 - blockKeywords('follow'); // 屏蔽指定关键词 - blockType(); // 屏蔽指定类别(视频/文章等) - blockType('follow'); // 屏蔽指定类别(赞同了XX/关注了XX等) - } else { - blockUsers(); + if (location.pathname !== '/column-square'){ // 不是首页 - 专栏时 + setInterval(function(){topTime_('.TopstoryItem', 'ContentItem-meta')}, 300); // 置顶显示时间 + addTypeTips(); // 区分问题文章 + addToQuestion(); // 直达问题按钮 + if (location.pathname == '/') { // 推荐 + blockLowCount('index'); // 屏蔽低赞/低评回答/文章 + blockUsers('index'); // 屏蔽指定用户 + blockKeywords('index'); // 屏蔽指定关键词 + blockType(); // 屏蔽指定类别(视频/文章等) + } else if (location.pathname == '/hot') { // 热榜 + blockKeywords('index'); // 屏蔽指定关键词 + blockHotOther(); // 屏蔽热榜杂项 + } else if (location.pathname == '/follow') { // 关注 + blockLowCount('follow'); // 屏蔽低赞/低评回答/文章 + blockUsers('follow'); // 屏蔽指定用户 + blockKeywords('follow'); // 屏蔽指定关键词 + blockType(); // 屏蔽指定类别(视频/文章等) + blockType('follow'); // 屏蔽指定类别(赞同了XX/关注了XX等) + } } } } -})(); +})(); \ No newline at end of file diff --git a/other/Autopage/ruleUpdateTime.json b/other/Autopage/ruleUpdateTime.json index d8db53d74..a1962ba6d 100644 --- a/other/Autopage/ruleUpdateTime.json +++ b/other/Autopage/ruleUpdateTime.json @@ -1 +1 @@ -1649901372 \ No newline at end of file +1736291521 \ No newline at end of file diff --git a/other/Autopage/rules.json b/other/Autopage/rules.json index e8e25065a..c5c32cd15 100644 --- a/other/Autopage/rules.json +++ b/other/Autopage/rules.json @@ -2,10 +2,10 @@ "百度搜索": { "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": "id('page')//a[contains(text(),'下一页')]", + "nextL": "#page strong+a:not(.n)", "pageE": "#content_left", "replaceE": "#page" } @@ -35,14 +35,9 @@ "host": "/^www\\.google\\./", "url": "return (fun.lp() == '/search' && (!fun.indexOF('tbm=','s') || (fun.indexOF('tbm=nws','s') || fun.indexOF('tbm=vid','s') || fun.indexOF('tbm=bks','s'))) && (fun.indexOF('sclient=mobile','s') || fun.isMobile()))", "pager": { - "nextL": "footer>div:first-child a[aria-label]", - "pageE": "id('main')/div[position()>1][position()div", + "isHidden": true } }, "谷歌搜索": { @@ -51,19 +46,16 @@ "history": true, "pager": { "nextL": "#pnnext,footer>div:first-child a[aria-label]", - "pageE": "id('search')/div | id('rso')/div | //style[not(contains(text(),'table,div,span,p{display:none}'))] | //body/script[@nonce][not(@src)][starts-with(text(),'(function(){var s=') or starts-with(text(),'(function(){google.ldi')]", + "pageE": "id('search')/div | id('rso')/div | //style[not(contains(text(),'table,div,span,p{display:none}'))] | //body//script[@nonce][not(@src)][contains(text(),'_setImagesSrc')]", "replaceE": "#navcnt,#rcnt div[role='navigation'],#botstuff div[role='navigation'],#main>footer>div:first-child", "scriptT": 2, "scrollD": 2500 - }, - "function": { - "bF": "fun.getAllCSS('#search img[id^=dimg],#search img[id^=rimg],#rso img[id^=dimg],#rso img[id^=rimg]').forEach(function (img) {img.id = 'old_'+img.id;}); if(!fun.indexOF('tbm=vid','s') && fun.indexOF('tbm=','s')){return pageE}else{pageE.forEach(function (img) {fun.getAllCSS('img[id^=dimg]:not([data-atf])',img).forEach(function (img1) {img1.setAttribute('data-atf','1');})}); return pageE}" } }, "必应搜索 + 手机版": { "host": ["www.bing.com","cn.bing.com","www4.bing.com","global.bing.com"], - "url": "if (fun.lp() == '/search') {if (fun.isMobile() && document.documentElement.lang != 'zh') {return false;} else {return true;}}", - "style": "#b_footer,.b_msg,#bnp_rich_div", + "url": "fun.isUrlC();if (fun.lp() == '/search') {if (fun.isMobile()){rule.blank=3;rule.pager.type=6;rule.pager.loadTime=1000;};return true;}", + "style": "#b_footer,.b_msg,#bnp_rich_div,.cn_related_search_upsell_container", "history": true, "pager": { "nextL": "a.sb_pagN,a.sb_halfnext,a.sb_fullnpl", @@ -182,14 +174,34 @@ "url": "/\\/search/", "history": false, "pager": { - "nextL": "js; return fun.getNextF('//div[contains(@class,\"pagination\")]/form[./button[@class=\"pagination__next-prev-button next\"]]')", - "pageE": "section.w-gl--desktop>div", + "nextL": "js; return fun.getNextF('//div[contains(@class,\"pagination\")]/form[last()]')", + "pageE": ".result,head>style[data-emotion]", "replaceE": ".pagination" } }, + "Libre Search": { + "host": "so.ddns-ip.net", + "url": "/^\\/search/", + "history": false, + "pager": { + "nextL": "js; return fun.getNextF('.next_page')", + "pageE": "#urls>[class^=template_group_], #urls>.result", + "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", @@ -198,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": { @@ -288,41 +300,13 @@ "replaceE": ".pagination" } }, - "百度贴吧 - 搜索页": { - "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, + "4get.ca 搜索": { + "host": "4get.ca", + "url": "/^\\/(web|images|videos|news|music)/", + "blank": 3, "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))" + "nextL": ".nextpage", + "pageE": ".text-result, .image-wrapper" } }, "豆瓣": { @@ -345,9 +329,10 @@ "豆瓣 - top250/分集短评/剧评影评/在看/想看/看过/作品/图片": { "host": ["movie.douban.com","music.douban.com","book.douban.com"], "url": "return (fun.lp() == '/top250' || fun.indexOF(/^\\/subject\\/\\d+\\/(episode|tv_discuss|reviews|photos)/) || fun.indexOF(/^\\/people\\/.+\\/(do|wish|collect)/) || fun.indexOF(/^\\/celebrity\\/\\d+\\/(movies|photos)/))", + "blank": 5, "pager": { "nextL": "link[rel='next']", - "pageE": ".grid_view,#comments,.review-list,.interest-list,.grid-view,.grid_view>ul>li,.poster-col3>li", + "pageE": ".grid_view,.article>.indent>p.ul,.article>.indent>table,#comments,.review-list,.interest-list,.grid-view,.grid_view>ul>li,.poster-col3>li", "replaceE": ".paginator", "scrollD": 2500 } @@ -363,12 +348,12 @@ "loadTime": 1000 } }, - "豆瓣 - 片单/标签/小组讨论精选/广播/日记": { + "豆瓣 - 片单/标签/人物图片/人物作品/小组讨论精选/广播/日记": { "host": "www.douban.com", - "url": "return (fun.indexOF(/^\\/(doulist|tag)\\//) || fun.lp() == '/group/explore' || ((fun.indexOF(/^\\/people\\/.+\\/status/) && fun.indexOF('tab=','s') && !fun.indexOF('tab=collect','s'))) || (fun.indexOF(/^\\/note\\/\\d+\\//) && fun.indexOF('type=','s')))", + "url": "return (fun.indexOF(/^\\/(doulist|tag)\\//) || fun.indexOF(/^\\/personage\\/\\d+\\/(photos|creations)/) || fun.lp() == '/group/explore' || ((fun.indexOF(/^\\/people\\/.+\\/status/) && fun.indexOF('tab=','s') && !fun.indexOF('tab=collect','s'))) || (fun.indexOF(/^\\/note\\/\\d+\\//) && fun.indexOF('type=','s')))", "pager": { "nextL": "link[rel='next']", - "pageE": ".doulist-item,.article>.mod:not([id='doulist-info']),.channel-item,.list", + "pageE": ".doulist-item,.article>.mod:not([id='doulist-info']),ul.pics>li,ul.creations>li.creation,.channel-item,.list", "replaceE": ".paginator" } }, @@ -381,6 +366,9 @@ "pageE": ".comment-item,.list>ul>li", "replaceE": ".paginator", "scrollD": 2500 + }, + "function": { + "aF": "fun.getAllCSS('.cmt-img:not([data-render-type=video])>img[data-render-type=gif]:not([data-status=playing])').forEach((img)=>{img.outerHTML='';})" } }, "豆瓣 - 小组/讨论区": { @@ -482,6 +470,15 @@ "replaceE": "ul.hupu-rc-pagination" } }, + "虎扑社区 - 搜索页": { + "host": "bbs.hupu.com", + "url": "/^\\/search/", + "pager": { + "nextL": "js; return fun.getNextEP('li.hupu-rc-pagination-item-active+li.hupu-rc-pagination-item>a','page=',/page=\\d+/)", + "pageE": ".content-outline", + "replaceE": ".hupu-rc-pagination" + } + }, "虎扑社区": { "host": "bbs.hupu.com", "url": "return fun.isPager('r')", @@ -544,40 +541,16 @@ "煎蛋网": { "host": "jandan.net", "url": "/^(\\/$|\\/page\\/)/", - "style": "#nav_prev,#nav_next,.post.f:not(.list-post)", - "history": false, + "style": ".nav_prev,.nav_next,.post-item>.col-md-12,.post.f:not(.list-post)", "pager": { - "nextL": "//div[@class='wp-pagenavi']/a[contains(text(),'下一页') or contains(text(),'更多文章')]", - "pageE": "#content>.list-post", - "replaceE": ".wp-pagenavi" + "nextL": "//div[@class='page-navi']/a[contains(text(),'下一页') or contains(text(),'更多文章')]", + "pageE": ".post-list>.post-item", + "replaceE": ".page-navi" }, "function": { "bF": "return fun.src_bF(pageE)" } }, - "煎蛋网 - 大杂烩": { - "host": "jandan.net", - "url": "/^\\/dzh$/", - "pager": { - "type": 2, - "nextL": ".show_more", - "interval": 1500 - } - }, - "煎蛋网 - 吐槽": { - "host": "jandan.net", - "url": "/^\\/(qa|pic|ooxx|treehole)/", - "style": "#nav_prev,#nav_next,#tucao-gg {display: none !important;} .jandan-vote a.tucao-btn23:link {color: #c8c7cc !important;} .jandan-tucao {background-color: #fafaf9 !important;}", - "pager": { - "nextL": "a.previous-comment-page", - "pageE": "ol.commentlist>li[id^='comment-'],head>script:not([src])", - "replaceE": ".cp-pagenavi", - "scriptT": 2 - }, - "function": { - "bF": "fun.getAllCSS('a.tucao-btn,a.comment-like.like,a.comment-unlike.unlike').forEach(function (now) {now.className = now.className.replace('tucao-btn','tucao-btn23').replace('comment-unlike','comment-unlike23').replace('comment-like','comment-like23');}); return pageE" - } - }, "龙的天空": { "host": "www.lkong.com", "url": "fun.isUrlC(); return (fun.indexOF('/forum/'))", @@ -642,21 +615,12 @@ } }, "番组计划": { - "host": ["bgm.tv","bangumi.tv"], - "url": "return (fun.indexOF(/\\/(browser|subject_search|tag|wish)/) || fun.isPager())", + "host": ["bgm.tv","bangumi.tv","chii.in"], + "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"], - "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/'))", @@ -779,28 +768,18 @@ "replaceE": "div.ui-page" } }, - "淘股吧": { - "host": "www.taoguba.com.cn", - "url": "/^\\/$/", - "pager": { - "type": 2, - "nextL": "#dropDown_text[data-page]", - "interval": 1000, - "scrollD": 1000 - } - }, "淘股吧 - 论坛": { - "host": "www.taoguba.com.cn", - "url": "/\\/(bbs|zongban|dianzan|jinghua)\\//", + "host": "www.tgb.cn", + "url": "/^\\/(bbs|zongban|dianzan|jinghua|ttcl)\\//", "pager": { "nextL": "js; let next = fun.getCSS('.next-page.pageDisabled'),next_ = '/'; if (next) {next = next.getAttribute('onclick').replace('gotoPage(','').replace(')','').split(','); if (fun.indexOF(/\\/dianzan|jinghua\\//)) next_ = '-'; if (parseInt(next[0]) <= parseInt(next[2])) {return (`${location.origin}/${location.pathname.split('/')[1]}/${next[0]}${next_}${next[1]}`)};}; return '';", - "pageE": ".items-comment-list", + "pageE": ".Nbbs-tiezi-lists", "replaceE": ".t_page" } }, "淘股吧 - 生活圈": { - "host": "www.taoguba.com.cn", - "url": "/\\/shenghuoba\\//", + "host": "www.tgb.cn", + "url": "/^\\/shenghuoba\\//", "pager": { "nextL": "js; let next = fun.getCSS('#N_go_pageBtn'),next_ = location.pathname.split('/')[2].split('-')[0]; if (next && (parseInt(next.dataset.now) + 1 <= parseInt(next.dataset.total))) {if (!next_) next_ = 'H'; return (`${location.origin}/shenghuoba/${next_}-${parseInt(next.dataset.now) + 1}`)}; return '';", "pageE": ".lifeContent-topicList-item", @@ -808,12 +787,25 @@ } }, "淘股吧 - 帖子内": { - "host": "www.taoguba.com.cn", - "url": "/\\/Article\\//", + "host": "www.tgb.cn", + "url": "/^\\/a\\//", "thread": true, "pager": { "nextL": "js; let next = fun.getXpath('//div[contains(@class,\"t_page01\")]/a[contains(text(),\"下一页\")]');if (next) {next = next.getAttribute('onclick').replace('gotoPageTopic(','').replace(')','').split(','); if (parseInt(next[0]) <= parseInt(next[1])) {return (`${location.origin}/Article/${fun.getCSS(\"#looktopicID\").value}/${next[0]}`)}}; return '';", - "pageE": ".list-reply:not([style*=display])>div[id]", + "pageE": ".comment-data", + "replaceE": ".t_page" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, + "淘股吧 - 帖子内 - 只看楼主": { + "host": "www.tgb.cn", + "url": "/^\\/topic\\/lookUserTopic/", + "thread": true, + "pager": { + "nextL": "js; let next = fun.getXpath('//div[contains(@class,\"t_page01\")]/a[contains(text(),\"下一页\")]');if (next) {next = next.getAttribute('onclick').replace('gotoPageLookTopic(','').replace(')','').split(',');return fun.getNextUP('pageNo=',/pageNo=\\d+/,location.pathname,'2',next[1])}; return '';", + "pageE": ".comment-data", "replaceE": ".t_page" }, "function": { @@ -914,6 +906,33 @@ "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;}", + "pager": { + "nextL": "a[rel=next]", + "pageE": "tbody[id^=threadbits_forum_]>tr, #posts>div[align]", + "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'))", @@ -934,8 +953,38 @@ "replaceE": ".pages" } }, + "archlinux - bbs": { + "host": ["bbs.archlinux.org","bbs.archlinuxcn.org"], + "url": "/^\\/(viewforum|viewtopic)\\.php/", + "blank": 3, + "pager": { + "nextL": "a[rel=next]", + "pageE": "#vf tbody>tr, .blockpost[id]", + "replaceE": ".pagelink" + } + }, + "archlinux - wiki": { + "host": ["wiki.archlinux.org","wiki.archlinuxcn.org"], + "url": "/^\\/wzh\\/index\\.php/", + "blank": 3, + "pager": { + "nextL": "a.mw-nextlink", + "pageE": ".mw-search-result", + "replaceE": ".mw-pager-navigation-bar" + } + }, + "archlinux - aur": { + "host": ["archlinux.org","aur.archlinux.org"], + "url": "/^\\/packages/", + "blank": 3, + "pager": { + "nextL": ".next>a,span.page+a.page", + "pageE": "#pkglist-results tbody>tr", + "replaceE": ".pkglist-nav" + } + }, "北+": { - "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()='»')]", @@ -944,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": { @@ -957,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": { @@ -967,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()='»')]", @@ -1142,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/", @@ -1162,7 +1221,7 @@ } }, "nodeseek": { - "host": "www.nodeseek.com", + "host": ["www.nodeseek.com","www.deepflood.com"], "url": "return fun.isPager()", "pager": { "nextL": "a.pager-next", @@ -1177,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 - 用户作品页": { @@ -1187,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 - 手机版 - 分类页": { @@ -1197,7 +1256,7 @@ "iframe": true, "pager": { "type": 5, - "nextL": "a.next" + "nextL": "button[aria-current=true]+a" } }, "Pixiv - 手机版 - 用户作品页": { @@ -1349,11 +1408,12 @@ }, "昵图网": { "host": ["www.nipic.com","soso.nipic.com"], + "url": "return fun.isPager()", "style": "li.search-works-item,a.search-works-nextpage", "pager": { - "nextL": "//a[@title='下一页' or text()='下一页'][not(contains(@class,'search-works-nextpage'))]", - "pageE": "li.new-search-works-item,li.new-works-box", - "replaceE": ".common-page-box" + "nextL": ".common-page-box>.page-num-on+a,.seo-page>.seo-page-on+a", + "pageE": "#img-list-outer>li.new-search-works-item,li.new-works-box", + "replaceE": ".common-page-box,.seo-page" }, "function": { "bF": "return fun.src_bF(pageE)" @@ -1438,6 +1498,31 @@ "bF": "return fun.src_bF(pageE,[0,'img[data-url]','data-url'])" } }, + "全景酷逊素材": { + "host": ["www.360kuxun.com","png.360kuxun.com"], + "url": "return fun.isPager()", + "pager": { + "nextL": "//a[@class='next page-numbers'] | //div[@class='pagebox']/a[text()='下一页 »']", + "pageE": ".card-columns", + "replaceE": ".pagination,.pagebox" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, + "觅元素": { + "host": "www.51yuansu.com", + "url": "return fun.isPager()", + "style": "li.pic-item{max-height: 330px;width: auto;} #f-content>div{position: static !important; float: left !important; width: 285px !important;}", + "pager": { + "nextL": ".nextpage", + "pageE": "li.pic-item,#f-content>div", + "replaceE": ".pager-wrap" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, "vcg.com": { "host": "www.vcg.com", "url": "fun.isUrlC(); return fun.indexOF(/^\\/creative-(image|illustration)\\//)", @@ -1912,6 +1997,25 @@ "replaceE": ".pagination" } }, + "机游网": { + "host": "pcgamexiazai.com", + "url": "/^\\/games/", + "pager": { + "nextL": "li.active+li>a", + "pageE": ".game-box>li", + "replaceE": ".pagination" + } + }, + "modland": { + "host": "www.modland.net", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": "li.active.page-item+li>a", + "pageE": ".mods>.post", + "replaceE": ".pagination" + } + }, "Modrinth": { "host": "modrinth.com", "url": "fun.isUrlC(); return (fun.lp() == '/mods')", @@ -1943,11 +2047,22 @@ }, "CurseForge": { "host": "www.curseforge.com", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".btn-next", + "pageE": ".results-container>div", + "replaceE": ".pagination" + } + }, + "CurseForge - legacy": { + "host": "legacy.curseforge.com", + "url": "return fun.isPager()", + "blank": 3, "pager": { "nextL": ".pagination-next>a", "pageE": "div.my-2", - "replaceE": ".pagination", - "scrollD": 2500 + "replaceE": ".pagination" } }, "Planet Minecraft": { @@ -2011,6 +2126,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'))", @@ -2021,6 +2148,20 @@ "replaceE": ".ajax-pager" } }, + "koyso": { + "host": "koyso.to", + "url": "return fun.isPager()", + "style": ".skeleton", + "blank": 4, + "pager": { + "nextL": "js; return fun.getNextEP('.page_num[style]+a.page_num','page=',/page=\\d+/)", + "pageE": ".games_content", + "replaceE": ".pagination" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, "cs.rin.ru - 帖子列表": { "host": "cs.rin.ru", "url": "return (fun.lp() == '/forum/viewforum.php')", @@ -2064,8 +2205,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": { @@ -2074,8 +2215,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": { @@ -2104,6 +2245,16 @@ "replaceE": ".bottom-page" } }, + "byrutgame": { + "host": "byrutgame.org", + "url": "if(fun.getCSS('.show_more')){rule.pager.type=2;rule.pager.nextL='.active .show_more:not(.disabled)';return true;}else{return fun.isPager();}", + "blank": 3, + "pager": { + "nextL": ".page_next>a", + "pageE": ".short_item", + "replaceE": ".navigation" + } + }, "steamrip": { "host": "steamrip.com", "url": "return fun.isPager()", @@ -2149,6 +2300,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'))", @@ -2156,7 +2317,7 @@ "history": true, "pager": { "type": 6, - "nextL": "js; return fun.getNextEP('.vui_pagenation--btn-num.vui_button--active+button.vui_pagenation--btn-num','page=',/page=\\d+/)", + "nextL": "js; return fun.getNextEP('.vui_pagenation--btn-num.vui_button--active+button.vui_pagenation--btn-num','page=',/page=\\d+(&o=\\d+)?/)", "pageE": ".video-list-item,.media-list>div,.video-list>div", "replaceE": ".vui_pagenation--btns", "loadTime": 600, @@ -2185,6 +2346,15 @@ "replaceE": ".pagination_wrap" } }, + "mini4k.io": { + "host": "mini4k.io", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": "a.pager__item--next", + "pageE": "li.column" + } + }, "厂长资源": { "host": ["czspp.com","www.czspp.com"], "url": "return fun.isPager()", @@ -2223,6 +2393,19 @@ "bF": "return fun.src_bF(pageE)" } }, + "网飞猫": { + "host": ["www.ncat1.app","/^www\\.nca(t)?\\d+\\.com$/"], + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".page-item-next", + "pageE": ".module-item", + "replaceE": ".pagenation-box" + }, + "function": { + "bF": "pageE.forEach((a)=>{let b=fun.getCSS('img[data-original]:not(#noneCoverImg)',a); b.src=window.RDUL[0]+b.dataset.original});return pageE;" + } + }, "ZzzFun 动漫": { "host": "www.zzzfun.com", "url": "/^\\/vod_(type|show|search)/", @@ -2311,21 +2494,12 @@ "replaceE": "#container>div[style='text-align: center; line-height: 36px;']" } }, - "子夜动漫": { - "host": "www.ziyedm.com", - "url": "return fun.isPager()", - "pager": { - "nextL": ".page-active+a", - "pageE": ".content-list>li", - "replaceE": ".pages" - } - }, - "omofun 动漫": { - "host": ["/^omofun[a-z]\\.[a-z]+$/","dilidilidm.com"], + "嘀哩嘀哩 动漫+omofun 动漫": { + "host": ["dilidilidm.com","/^(www\\.)omofun[a-z]\\.[a-z]+$/"], "url": "return fun.isPager()", "blank": 3, "pager": { - "nextL": "//a[@class='active']/../following-sibling::li[1]/a", + "nextL": "//ul[contains(@class,'hl-page-wrap')]//a[@class='active']/../following-sibling::li[1]/a", "pageE": ".hl-list-item", "replaceE": ".hl-page-wrap" }, @@ -2460,6 +2634,19 @@ "interval": 1500 } }, + "Kimivod": { + "host": "kimivod.com", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".pagination__next", + "pageE": ".container_list>.post", + "replaceE": ".pagination" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, "VCB-Studio": { "host": "vcb-s.com", "url": "return fun.isPager()", @@ -2591,7 +2778,7 @@ } }, "YTS": { - "host": "yts.mx", + "host": ["yts.bz","yts.lt","yts.gg","yts.am","yts.ag"], "url": "/^\\/browse-movies/", "blank": 3, "pager": { @@ -2652,15 +2839,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\\//", @@ -2671,7 +2849,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": { @@ -2690,6 +2868,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')))", @@ -2700,6 +2888,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/", @@ -2792,8 +2999,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" } @@ -2801,8 +3009,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" @@ -2829,7 +3038,7 @@ } }, "字幕库 zmk": { - "host": ["zmk.pw","zimuku.org","zimuku.pw"], + "host": ["srtku.com","zmk.pw","zimuku.org","zimuku.pw"], "url": "if (!fun.indexOF('/detail/') && !fun.indexOF('/subs/')) {if (fun.lp() == '/') {fun.getCSS('.box>.table').insertAdjacentHTML('beforebegin','
')}; return true;}", "pager": { "nextL": "a.next", @@ -2883,7 +3092,7 @@ } }, "DL-Raw": { - "host": "dl-raw.se", + "host": "dl-raw.ac", "url": "/^\\/($|\\?s=|tag|page|category)/", "blank": 3, "pager": { @@ -3106,9 +3315,35 @@ "bF": "return fun.src_bF(pageE)" } }, - "快岸漫画": { - "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;}", + "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;}", "style": ".pagination.justify-content-center,#left,#right,p[id^='page_c_'] {display: none !important;} .content-wrapper>img {min-height: 300px;}", "history": true, "pager": { @@ -3180,6 +3415,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);}", @@ -3239,7 +3502,7 @@ } }, "包子漫画": { - "host": ["www.czmanga.com","cn.czmanga.com","www.webmota.com","cn.webmota.com","cn.baozimh.com","www.twmanga.com","www.kukuc.co","cn.kukuc.co"], + "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"], "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, @@ -3322,7 +3585,7 @@ } }, "古风漫画网 / 优酷漫画 / 36 漫画 / 360 漫画 / 漫漫台 / 古漫画 / 前未漫画 / 下拉式漫画 / 漫画1234 - 分类页": { - "host": ["www.gufengmh.com","/^www\\.gufengmh\\d/","www.123gf.com","36manga.com","www.36manga.com","36manhua.com","www.36manhua.com","www.36man.cc","www.manmantai.com","www.xlsmh.com","www.gmh1234.com"], + "host": ["www.gufengmh.com","/^www\\.gufengmh\\d/","/^www\\.ykmh\\.[a-z]+$/","www.123gf.com","36manga.com","www.36manga.com","36manhua.com","www.36manhua.com","www.36man.cc","www.manmantai.com","www.xlsmh.com","www.gmh1234.com"], "url": "/^\\/(comic\\/)?(update|list|search)/", "blank": 3, "pager": { @@ -3332,12 +3595,12 @@ } }, "古风漫画网 / 优酷漫画 / 36 漫画 / 360 漫画 / 漫漫台 / 古漫画 / 前未漫画 / 下拉式漫画 / 漫画1234": { - "host": ["www.gufengmh.com","/^www\\.gufengmh\\d/","www.123gf.com","36manga.com","www.36manga.com","36manhua.com","www.36manhua.com","www.36man.cc","www.manmantai.com","www.xlsmh.com","www.gmh1234.com"], - "url": "if (fun.indexOF(/\\/\\d+\\.html$/)) {if (/^www\\.(123gf|ykmh|izhegu|qianwee|manmantai)\\.com$/.test(location.hostname)|| location.hostname.indexOf('36man') != -1) {if (localStorage.getItem('chapterScroll') != '\"pagination\"') {localStorage.setItem('chapterScroll','\"pagination\"'); location.reload();} else {setTimeout(()=>{let _img = '',host = SinMH.getResHostDomain(); if (/^www\\.(ykmh|izhegu)\\.com$/.test(location.hostname)) {chapterPath=''}else if (location.hostname.indexOf('36man') == -1||location.hostname=='www.123gf.com'||location.hostname=='www.gmh1234.com'){host+='/'}; if (location.hostname == 'www.36man.cc' ||(location.hostname == 'www.manmantai.com' && chapterImages[0].slice(0,4) == 'http')){host=''}; for (let i=0;i`;}; document.getElementById('images').innerHTML = _img;},500); return true;}} else if (localStorage.getItem('chapterScroll') != '\"scroll\"') {localStorage.setItem('chapterScroll','\"scroll\"'); location.reload();}else{return true}}", + "host": ["www.gufengmh.com","/^www\\.gufengmh\\d/","/^www\\.ykmh\\.[a-z]+$/","www.123gf.com","36manga.com","www.36manga.com","36manhua.com","www.36manhua.com","www.36man.cc","www.manmantai.com","www.xlsmh.com","www.gmh1234.com"], + "url": "if (fun.indexOF(/\\/\\d+\\.html$/)) {if (/^www\\.(123gf|ykmh|izhegu|qianwee|manmantai)\\.[a-z]+$/.test(location.hostname)|| location.hostname.indexOf('36man') != -1) {if (localStorage.getItem('chapterScroll') != '\"pagination\"') {localStorage.setItem('chapterScroll','\"pagination\"'); location.reload();} else {setTimeout(()=>{let _img = '',host = SinMH.getResHostDomain(); if (/^www\\.(ykmh|izhegu)\\.[a-z]+$/.test(location.hostname)) {chapterPath=''}else if (location.hostname.indexOf('36man') == -1||location.hostname=='www.123gf.com'||location.hostname=='www.gmh1234.com'){host+='/'}; if (/^www\\.(ykmh)\\.[a-z]+$/.test(location.hostname) || location.hostname == 'www.36man.cc' ||(location.hostname == 'www.manmantai.com' && chapterImages[0].slice(0,4) == 'http')){host=''}; for (let i=0;i`;}; document.getElementById('images').innerHTML = _img;},500); return true;}} else if (localStorage.getItem('chapterScroll') != '\"scroll\"') {localStorage.setItem('chapterScroll','\"scroll\"'); location.reload();}else{return true}}", "style": ".img_land_prev,.img_land_next,#sider-left,#sider-right,p.img_info,.tc,.chapter-view + .w996,.chapter-view>div[style]:not([id]):not([class]) {display: none !important;} #images{min-height: 6000px !important;} #images>img {display: inline-block !important;min-height: 400px;margin: 0 auto !important;border: none !important;padding: 0 !important;max-width: 99% !important;height: auto !important;}", "history": true, "pager": { - "nextL": "js; let url = comicUrl.replace('.html','/') + nextChapterData.id + '.html'; if (nextChapterData.id != null && url && url != '.html' && url != location.href) return url", + "nextL": "js; let url = comicUrl.replace('.html','/').replace('http://',location.protocol+'//') + nextChapterData.id + '.html'; if (nextChapterData.id != null && url && url != '.html' && url != location.href) return url", "pageE": "//script[contains(text(),'chapterImages')]", "insertP": ["body",3], "scriptT": 2, @@ -3345,7 +3608,7 @@ "scrollD": 4000 }, "function": { - "aF": "let _img = '',host = SinMH.getResHostDomain(); if (/^www\\.(ykmh|100fanwo|izhegu|xlsmh)\\.com$/.test(location.hostname)) {chapterPath=''}else if (location.hostname.indexOf('36man') == -1||location.hostname=='www.123gf.com'||location.hostname=='www.gmh1234.com'){host+='/'}; if (location.hostname == 'www.36man.cc' ||(location.hostname == 'www.manmantai.com' && chapterImages[0].slice(0,4) == 'http') ||location.hostname == 'www.xlsmh.com'){host=''}; for (let i=0;i`;}; document.getElementById('images').insertAdjacentHTML('beforeend',_img);" + "aF": "let _img = '',host = SinMH.getResHostDomain(); if (/^www\\.(ykmh|100fanwo|izhegu|xlsmh)\\.[a-z]+$/.test(location.hostname)) {chapterPath=''}else if (location.hostname.indexOf('36man') == -1||location.hostname=='www.123gf.com'||location.hostname=='www.gmh1234.com'){host+='/'}; if (/^www\\.(ykmh)\\.[a-z]+$/.test(location.hostname) || location.hostname == 'www.36man.cc' ||(location.hostname == 'www.manmantai.com' && chapterImages[0].slice(0,4) == 'http') ||location.hostname == 'www.xlsmh.com'){host=''}; for (let i=0;i`;}; document.getElementById('images').insertAdjacentHTML('beforeend',_img);" } }, "爱漫之家 / 733 动漫": { @@ -3401,6 +3664,28 @@ "replaceE": ".pagination" } }, + "G站漫画": { + "host": ["manhuafree.com","manhuascans.org"], + "url": "return fun.isPager('n')", + "pager": { + "type": 6, + "nextL": "#nextChapterLink", + "pageE": "#chapcontent>div", + "replaceE": "#nextChapterLink,#preChapterLink", + "loadTime": 1000, + "scrollD": 4000 + } + }, + "G站漫画 - 分类页": { + "host": ["manhuafree.com","manhuascans.org"], + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": "a[aria-label^=下]", + "pageE": ".cardlist>div", + "replaceE": ".cardlist+div" + } + }, "COLAMANGA 漫画": { "host": "www.colamanga.com", "url": "if (fun.indexOF('.html')){if (!(fun.getCookie('mh_readmode') === '' || fun.getCookie('mh_readmode') === '3')) {document.cookie='mh_readmode=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/'; location.reload();}; return true;} else if (fun.indexOF(/\\/\\d+\\/$/)) {setTimeout(()=>{if (document.querySelector('a.website-display-all')) document.querySelector('a.website-display-all').click();},500);}", @@ -3440,6 +3725,46 @@ "scrollD": 3000 } }, + "WEBTOON漫画": { + "host": "www.webtoons.com", + "url": "/\\/viewer\\?/", + "style": "#_bottomDisplay,#footer{display: none !important;}#content{padding-bottom: 0 !important;}", + "pager": { + "nextL": ".pg_next._nextEpisode", + "pageE": "#_imageList>img", + "replaceE": "#toolbar>.paginate,#_bottomEpisodeList" + }, + "function": { + "bF": "return fun.src_bF(pageE, [0,'img[data-url]','data-url'])", + "aF": "fun.getAllCSS('#_bottomEpisodeList img[data-url][src$=png]').forEach(i=>{i.src=i.dataset.url;});" + } + }, + "MYCOMIC": { + "host": "mycomic.com", + "url": "/^\\/chapters\\/\\d+/", + "style": ".-mx-4.sm\\:mx-0,.-mx-4.sm\\:mx-0+div {display: none !important;} header {opacity: 0.4;}", + "pager": { + "nextL": "div[data-flux-button-group]>a:last-child", + "pageE": "img.page", + "replaceE": "div[data-flux-button-group]" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, + "MYCOMIC - 资料页": { + "host": "mycomic.com", + "url": "/^\\/comics([^\\/]|$)/", + "blank": 3, + "pager": { + "nextL": "span[aria-current]+a", + "pageE": ".group.relative", + "replaceE": "nav[role=navigation]" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, "起点中文": { "host": "www.qidian.com", "url": "/^\\/(all|rank|finish|free)/", @@ -3449,6 +3774,25 @@ "replaceE": "#page-container" } }, + "起点图数据": { + "host": "www.qidiantu.com", + "url": "/^\\/info\\/\\d+/", + "pager": { + "nextL": ".pagination>.active+li>a", + "pageE": ".alert-info~.panel.panel-default", + "replaceE": ".pagination" + } + }, + "起点图数据 - 书单": { + "host": "www.qidiantu.com", + "url": "/^\\/booklist\\/\\d+/", + "blank": 3, + "pager": { + "nextL": "//a[@class='btn btn-primary'][text()='后十本'][1]", + "pageE": ".well.well-sm.table-responsive", + "replaceE": "//a[@class='btn btn-primary'][text()='后十本'][1]" + } + }, "七猫中文 - 阅读页": { "host": "www.qimao.com", "url": "return (fun.indexOF(/\\/shuku\\/\\d+-\\d+\\//) || fun.indexOF('/reader/index/'))", @@ -3640,6 +3984,62 @@ "bF": "return fun.xs_bF(pageE,[/(^微信小程序.+|本章未完,请点击.+页$)/,''])" } }, + "TXT小说网 exotxt.net": { + "host": "www.exotxt.net", + "url": "/^\\/\\d+\\/\\d+\\/\\d+(_\\d+)?\\.html", + "style": ".info_dv1>p:last-of-type,#tag_news", + "pager": { + "type": 6, + "nextL": "//div[@class='read_btn']/a[text()='下一章'][not(contains(@href,'index.html'))]", + "pageE": ".info_dv1>p:not(:last-of-type)", + "replaceE": ".read_btn" + } + }, + "繁体小说 www.novels.com.tw": { + "host": "www.novels.com.tw", + "url": "/\\d\\.html\\?aid/", + "style": ".container>aside", + "pager": { + "type": 6, + "nextL": "#next_url", + "pageE": "#article.content>p", + "replaceE": ".read_nav", + "loadTime": 1000, + "scrollD": 1000 + } + }, + "得奇小说网": { + "host": "www.deqixs.com", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": "//div[@class='prenext']/span/a[text()='下一页' or text()='下一章']|//div[@class='page']//a[text()='下一页']", + "pageE": ".con>p,.item", + "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", + "style": "#content>*:not(br):not(:nth-child(1))", + "pager": { + "type": 6, + "nextL": "(//a[contains(text(), '下一章')])[last()]", + "pageE": "#content", + "insertP": ["#content",6], + "replaceE": ".bottomlink", + "loadTime": 500 + } + }, "皇帝之家": { "host": "www.huangdizhijia.com", "url": "/chapter-\\d+\\.html/", @@ -3684,15 +4084,17 @@ }, "哔哩轻小说": { "host": "www.linovelib.com", - "url": "return fun.indexOF(/\\/novel\\/\\d+\\/.+\\.html/)", + "url": "if (fun.indexOF(/\\/novel\\/\\d+\\/.+\\.html/)){setTimeout(()=>{let ac=fun.getCSS('#TextContent');if(ac){ac.classList.add('a123456');ac.classList.remove('adv-box');ac.style='display: block !important;';let ax=fun.getXpath(\"//head/style[not(@type)][normalize-space()='']\");document.head.appendChild(document.createElement('style')).textContent = Array.from(ax.sheet.cssRules).map(r => {return r.cssText;}).join(' ').replaceAll('#TextContent ','.a123456#TextContent ');ax.remove();}},300);return true;}", "history": true, "pager": { + "type": 6, "nextL": "//div[@class='mlfy_page']/a[contains(text(),'下一页') or contains(text(),'下一章')]", - "pageE": "#TextContent>*:not(div),head>style", - "replaceE": ".mlfy_page" + "pageE": "//div[@id='TextContent'] | //head/style[not(@type)][normalize-space()='']", + "replaceE": ".mlfy_page", + "loadTime": 1000 }, "function": { - "bF": "if(pageE[0].tagName=='STYLE'){pageE[pageE.length-1].style='font-family: read !important;';pageE[0].textContent=pageE[0].textContent.replace(' p:last-of-type','666')}; return pageE", + "bF": "const ra='a'+Math.random().toString(36).slice(-6);pageE.forEach(function (a) {if(a.tagName=='STYLE'){a.textContent=Array.from(a.sheet.cssRules).map(r => {return r.cssText;}).join(' ').replaceAll('#TextContent ','.'+ra+'#TextContent ');}else if(a.tagName=='DIV'){a.classList.add(ra);a.classList.remove('adv-box');a.style='display: block !important;'};}); return pageE", "aF": "document.body.appendChild(document.createElement('script')).textContent='yuedu()'" } }, @@ -3722,15 +4124,17 @@ }, "哔哩轻小说 - 手机版": { "host": "www.bilinovel.com", - "url": "/\\/novel\\/\\d+\\/.+\\.html/", + "url": "if (fun.indexOF(/\\/novel\\/\\d+\\/.+\\.html/)){setTimeout(()=>{let ac=fun.getCSS('#acontent');if(ac){ac.classList.add('a123456');ac.classList.remove('adv-box');ac.style='display: block !important;';let ax=fun.getXpath(\"//head/style[not(@type)][normalize-space()='']\");document.head.appendChild(document.createElement('style')).textContent = Array.from(ax.sheet.cssRules).map(r => {return r.cssText;}).join(' ').replaceAll('#acontent ','.a123456#acontent ');ax.remove();}},300);return true;}", "history": true, "pager": { + "type": 6, "nextL": "js; if (ReadParams.url_next.slice(ReadParams.url_next.length-5) === '.html') return (location.origin + ReadParams.url_next)", - "pageE": "id('acontentz')/*[name()='p' or name()='img' or name()='br'] | //body/script[contains(text(),'var ReadParams')] | //body/script[contains(@src,'/readtools.js')] | //head/style", - "scriptT": 2 + "pageE": "//div[@id='acontent'] | //body/script[contains(text(),'var ReadParams')] | //head/style[not(@type)][normalize-space()='']", + "scriptT": 2, + "loadTime": 1000 }, "function": { - "bF": "if(pageE[0].tagName=='STYLE'){pageE[pageE.length-2].style='font-family: read !important;';pageE[0].textContent=pageE[0].textContent.replace(' p:last-of-type','666')}; return pageE" + "bF": "const ra='a'+Math.random().toString(36).slice(-6);pageE.forEach(function (a) {if(a.tagName=='STYLE'){a.textContent=Array.from(a.sheet.cssRules).map(r => {return r.cssText;}).join(' ').replaceAll('#acontent ','.'+ra+'#acontent ');}else if(a.tagName=='DIV'){a.classList.add(ra);a.classList.remove('adv-box');a.style='display: block !important;'};}); return pageE" } }, "哔哩轻小说 - 手机版 - 文库": { @@ -3745,6 +4149,47 @@ "bF": "return fun.src_bF(pageE)" } }, + "刺猬猫阅读": { + "host": "www.ciweimao.com", + "url": "/^\\/chapter\\/\\d+/", + "pager": { + "type": 6, + "nextL": "#J_BtnPageNext", + "pageE": "#J_BookRead>p", + "replaceE": ".book-read-page", + "loadTime": 1000 + } + }, + "SF轻小说": { + "host": "book.sfacg.com", + "url": "/^\\/Novel\\/\\d+\\/\\d+\\/\\d+\\//", + "pager": { + "nextL": "//div[@class='fn-btn']/a[text()='下一章']", + "pageE": "#ChapterBody>p", + "replaceE": "#article>.fn-btn" + } + }, + "SF轻小说 - 书库": { + "host": "book.sfacg.com", + "url": "/^\\/List\\//", + "pager": { + "nextL": ".pagebarNext>a", + "pageE": ".Comic_Pic_List", + "replaceE": ".pagebar", + "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/", @@ -3766,6 +4211,17 @@ "replaceE": ".noveltitle[height]" } }, + "樱花文学 novnov": { + "host": "novnov.net", + "url": "/^\\/(book\\/chapter\\/|library|search)/", + "style": ".nextbox,.linea", + "blank": 3, + "pager": { + "nextL": ".nextp>a,li.current+li>a", + "pageE": ".novelcontent>p,.vlist>.nlist>li,.searchlist>ul>li", + "replaceE": ".footerbox,.changepage" + } + }, "AO3 - 列表页/搜索页": { "host": ["archiveofourown.org","i.ao3is.top"], "url": "return (fun.indexOF(/\\/works$/) || fun.lp() == '/works/search')", @@ -3786,6 +4242,16 @@ "replaceE": "#main ul.navigation,#feedback>ul.actions" } }, + "boxnovel.com": { + "host": "boxnovel.com", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": "#manga-reading-nav-foot .next_page,.nav-previous.float-left>a", + "pageE": ".reading-content>.text-left>p,.page-listing-item", + "replaceE": "#manga-reading-nav-head,#manga-reading-nav-foot,.paging-navigation" + } + }, "红袖招": { "host": "hongxiuzhao.org", "url": "return (fun.getCSS('.pager')&&fun.getCSS('.article-content'))", @@ -3796,6 +4262,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'))", @@ -3894,7 +4371,7 @@ "url": "return (fun.lp() == '/' && !location.search)", "pager": { "type": 2, - "nextL": ".active .load-more", + "nextL": ".gh-load-more>button", "interval": 1000, "scrollD": 4000 } @@ -4269,6 +4746,18 @@ "replaceE": ".pagination" } }, + "IEU OpenGWAS project": { + "host": "gwas.mrcieu.ac.uk", + "url": "/^\\/datasets\\//", + "pager": { + "type": 3, + "nextL": ".next>a", + "pageE": "#search tbody>tr", + "replaceE": ".pagination", + "interval": 0, + "scrollD": 200 + } + }, "维普网": { "host": "www.cqvip.com", "url": "/\\/search/", @@ -4403,6 +4892,15 @@ "scrollD": 1000 } }, + "再问科研": { + "host": "www.izaiwen.cn", + "url": "return fun.isPager()", + "pager": { + "nextL": ".page-item.active+li>a", + "pageE": ".item-box", + "replaceE": ".pagination" + } + }, "StackOverflow": { "host": "stackoverflow.com", "url": "return (fun.lp() == '/search' || (fun.indexOF(/^\\/questions/) && !fun.indexOF(/^\\/questions\\/\\d+/)) || fun.lp() == '/tags' || fun.lp() == '/users')", @@ -4642,9 +5140,9 @@ "replaceE": ".paginate-container" } }, - "Github - Issues/Pull/Discussions/Releases/Actions/OrgRepositories": { + "Github - Pull/Discussions/Releases/Actions/OrgRepositories": { "host": "github.com", - "url": "return (fun.indexOF(/\\/(issues|pulls|discussions|releases)$/) || fun.indexOF('/discussions/categories') || fun.indexOF(/\\/actions($|\\/workflows)/) || fun.indexOF(/^\\/orgs\\/.+\\/repositories/))", + "url": "return (fun.indexOF(/\\/(pulls|discussions|releases)$/) || fun.indexOF('/discussions/categories') || fun.indexOF(/\\/actions($|\\/workflows)/) || fun.indexOF(/^\\/orgs\\/.+\\/repositories/))", "blank": 4, "pager": { "nextL": "a.next_page", @@ -4652,6 +5150,26 @@ "replaceE": ".pagination" } }, + "Github - Issue/Discussions/Pull - loadmore": { + "host": "github.com", + "url": "return fun.indexOF(/\\/(issues|discussions|pull)\\/\\d+$/)", + "pager": { + "type": 2, + "nextL": "button[data-testid=issue-timeline-load-more-load-top][aria-disabled=false], button.ajax-pagination-btn[data-disable-with=Loading…]:not([disabled])", + "scrollD": 9999 + } + }, + "Github - Issues": { + "host": "github.com", + "url": "return fun.indexOF(/\\/issues$/)", + "style": "[class*='IssueItem-module__ListItem_'] div[class*=LoadingSkeleton]", + "blank": 6, + "pager": { + "nextL": "js; return fun.getNextUP('page=',/page=\\d+/,fun.lp(),'2',fun.getXpath('//a[@rel=\\'next\\'][not(@aria-disabled)]/preceding-sibling::a[1][not(@aria-current)]').textContent)", + "pageE": "div[class^='IssueRow-module_']", + "replaceE": "nav[class^=prc-Pagination-PaginationContainer-]" + } + }, "Github - Commits": { "host": "github.com", "url": "/\\/commits/", @@ -4659,7 +5177,7 @@ "blank": 4, "pager": { "nextL": "a[data-testid=pagination-next-button]:not([aria-disabled])", - "pageE": ".Timeline-Item" + "pageE": "div[class^='prc-Timeline-Timeline-']>div" } }, "Github - Tags": { @@ -4688,9 +5206,9 @@ "style": "header.AppHeader {position: fixed !important;width: 100% !important;top: 0px !important;z-index: 100 !important;} .application-main {margin-top: 64px !important;}", "blank": 4, "pager": { - "nextL": "a[rel=next][class^=Pagination]", + "nextL": "a[rel=next][class^=prc-Pagination]", "pageE": "[data-testid=results-list]>div,.repo-list>li,.code-list-item,#commit_search_results>div,.issue-list-item,.discussion-list-item,#package_search_results>div,#marketplace_search_results>div:first-child>div,.topic-list-item,#wiki_search_results>div:first-child>div,#user_search_results>div:first-child>div", - "replaceE": "nav[class^='Pagination__PaginationContainer'],.pagination" + "replaceE": "nav[class^=prc-Pagination-PaginationContainer]" } }, "Github - Gist - Search/discover": { @@ -4804,6 +5322,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')", @@ -4893,6 +5422,15 @@ "replaceE": "nav.elementor-pagination" } }, + "中华典藏": { + "host": "www.zhonghuadiancang.com", + "url": "/\\/\\d+\\.html$/", + "pager": { + "nextL": "//div[@class='m-page']//button[text()='下一章']/..", + "pageE": "#content>p", + "replaceE": ".m-page" + } + }, "AfreecaTV": { "host": "www.afreecatv.com", "pager": { @@ -4902,13 +5440,13 @@ } }, "GreasyFork": { - "host": ["greasyfork.org","sleazyfork.org"], + "host": ["greasyfork.org","cn-greasyfork.org","sleazyfork.org"], "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": { @@ -4981,6 +5519,20 @@ "replaceE": ".s-pagination-container" } }, + "Amazon - gp": { + "host": "/^www\\.amazon\\.([a-z]+|com?\\.[a-z]+)$/", + "url": "return fun.isPager()", + "style": "#navFooter,#rhf", + "blank": 3, + "pager": { + "type": 6, + "nextL": ".a-selected+li.a-normal>a", + "pageE": ".a-ordered-list>li.zg-no-numbers", + "replaceE": ".a-pagination", + "loadTime": 7000, + "scrollD": 1000 + } + }, "eBay": { "host": "/^(www|[a-z]{2})\\.ebay\\.([a-z]+|com?\\.[a-z]+)$/", "url": "/^\\/sch\\//", @@ -5072,6 +5624,17 @@ "replaceE": ".cut-page" } }, + "kmoe": { + "host": ["mox.moe","kox.moe","kxo.moe","koz.moe","kxx.moe","kzz.moe"], + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "type": 6, + "nextL": "(//tr[@style='vertical-align:top'])[1]//button[@class='bt_sml_main'][starts-with(text(), '下')]/..", + "pageE": "tr.listbg", + "replaceE": "tr[style='vertical-align:top']:first-child" + } + }, "摩点众筹": { "host": "zhongchou.modian.com", "url": "return (fun.getCSS('.page')&&fun.getCSS('.pro_ul>li'))", @@ -5091,6 +5654,14 @@ "replaceE": ".page" } }, + "3G壁纸": { + "host": "www.3gbizhi.com", + "url": "return fun.isPager()", + "pager": { + "nextL": ".cur+a", + "pageE": ".contlistw>.cl>li" + } + }, "nastol": { "host": "www.nastol.com.ua", "blank": 3, @@ -5119,6 +5690,27 @@ "replaceE": ".pager" } }, + "10wallpaper.com": { + "host": "10wallpaper.com", + "url": "return fun.isPager()", + "style": "#pics-list>p {display: inline-block !important;}", + "pager": { + "nextL": ".nowpg+a", + "pageE": "#pics-list>p", + "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/'))", @@ -5129,6 +5721,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() != '/')", @@ -5197,6 +5800,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/", @@ -5298,6 +5911,16 @@ "replaceE": ".pagination" } }, + "中国科普博览 - 科学大院": { + "host": "www.kepu.net.cn", + "url": "/^\\/dayuan\\//", + "pager": { + "type": 6, + "nextL": ".text_align_center.mt50>span+a", + "pageE": ".dy>li", + "replaceE": ".text_align_center.mt50" + } + }, "学佛网": { "host": "www.xuefo.tw", "pager": { @@ -5314,6 +5937,14 @@ "replaceE": ".page" } }, + "中國評論新聞": { + "host": ["www.crntt.com","hk.crntt.com"], + "url": "return fun.isPager('n')", + "pager": { + "nextL": "//img[contains(@src,'next_page.gif')]/..|//a[text()='下一頁']", + "pageE": "table[width='100%'][border='0'][cellspacing='0'][cellpadding='0'][height='200']>tbody>tr, table[width='97%'][border='0'][cellspacing='0'][cellpadding='5']>tbody>tr:not(:last-child)" + } + }, "东方资讯": { "host": "mini.eastday.com", "url": "/\\/nsa\\//", @@ -5327,6 +5958,26 @@ "bF": "return fun.src_bF(pageE,[0,'img[data-url]','data-url'])" } }, + "美食天下": { + "host": "www.meishichina.com", + "url": "return fun.isPager()", + "pager": { + "nextL": ".now_page+a", + "pageE": ".main .plist>li", + "replaceE": ".ui-page-inner" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, + "美食天下2": { + "host": "home.meishichina.com", + "url": "return fun.isPager()", + "pager": { + "type": 2, + "nextL": "#recipeindex_living_loading>a" + } + }, "Xvideos": { "host": ["www.xnxx.com","www.xvideos.com"], "url": "return fun.isPager('p,r')", @@ -5343,12 +5994,12 @@ }, "PornHub": { "host": "/\\.pornhub\\.com$/", - "url": "/^\\/video/", + "url": "return fun.isPager()", "style": ".footerContentWrapper,.pre-footer", "blank": 3, "pager": { - "nextL": "li.page_next>a", - "pageE": "#videoSearchResult>li.pcVideoListItem,#videoCategory>li.pcVideoListItem", + "nextL": ".page_next>a", + "pageE": ".container ul.videos:not(#bottomVideos)>li[data-video-id], .container ul.videoList>li[data-video-id]", "replaceE": ".pagination3" }, "function": { @@ -5415,8 +6066,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": { @@ -5510,6 +6171,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/'))", @@ -5530,6 +6221,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/))", @@ -5551,19 +6251,50 @@ } }, "MissAV": { - "host": ["missav.com","/^missav\\d+\\.com$/"], - "url": "return ((fun.indexOF(/^\\/dm\\d+\\//) || fun.indexOF('/search/') || fun.indexOF(/\\/\\(actresses|actors|genres|series|makers|directors\\)\\//)) && fun.isPager('n'))", + "host": ["/^missav.[a-z]+/","/^missav\\d+\\.com$/"], + "url": "if((fun.indexOF(/^\\/dm\\d+\\//) || fun.indexOF('/search/') || fun.indexOF(/\\/\\(actresses|actors|genres|series|makers|directors\\)\\//)) && fun.isPager('n')){if(fun.isMobile()){rule.blank=0;};return true;}", "blank": 3, "pager": { + "type": 3, "nextL": "a[rel=next]", "pageE": "div[x-init*=initLozad]>div", - "replaceE": "//span[@aria-current='page']/..", - "scrollD": 1000 + "replaceE": "//span[@aria-current='page']/../../..", + "scrollD": 500 }, "function": { "bF": "return fun.src_bF(pageE)" } }, + "123av": { + "host": ["/^123av\\.[a-z]+$/","/^1av\\.[a-z]+$/"], + "url": "return fun.isPager()", + "pager": { + "nextL": "a[rel=next]", + "pageE": ".box-item-list>div, body>script[src*='app.js']", + "replaceE": ".pagination", + "scriptT": 2 + } + }, + "javxx": { + "host": "javxx.com", + "url": "fun.isUrlC();return (!fun.indexOF(/^\\/[a-z]+\\/v\\//) && !fun.indexOF(/^\\/[a-z]+$/))", + "blank": 3, + "pager": { + "nextL": ".page-item.active+li>a", + "pageE": ".vid-items>.item", + "replaceE": "ul.pagination" + } + }, + "av6k.org": { + "host": "/^([0-9a-z-]+\\.)?av6k([0-9a-z]+)?\\.[a-z]+$/", + "url": "fun.insStyle('.clickadu,.clickadulist,#footer,.links,.links-top,.links-top2,.links-top3,a[href^=\\'http://\\'],.footlink,body>div[id][style],#shareQrcode');if(fun.isTitle('AV6K') && fun.lp() !== '/' && fun.getAllCSS('.pages_c').length === 2)return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".thisclass+li>a", + "pageE": ".listA", + "replaceE": ".pages_c" + } + }, "JavDB": { "host": "/^javdb/", "url": "return (fun.isTitle('JavDB') && !fun.indexOF('/v/') && fun.isPager('r'))", @@ -5604,6 +6335,9 @@ "nextL": "js; let next = fun.getXpath(\"//li[@class='page-item' and ./span[contains(@class,'active')]]/following-sibling::li/a\"); if (next) {return `${location.origin}${location.pathname}?mode=async&function=get_block&block_id=${next.dataset.blockId}&${next.dataset.parameters.replace('from_videos+','from_videos=' + next.textContent + '&').replaceAll(':','=').replaceAll(';','&').replaceAll('+','&')}&_=${+new Date()}`;}", "pageE": "section>.row", "replaceE": ".pagination" + }, + "function": { + "aF": "const newItems = fun.getAll('img[data-preview]:not(.preview-initialized)'); newItems.forEach(item => item.classList.add('preview-initialized')); $(newItems).videopreview();" } }, "JavDisk": { @@ -5632,6 +6366,16 @@ "bF": "return fun.src_bF(pageE)" } }, + "JAV吧 JAV8": { + "host": ["jav98.xyz","/^jav8\\.[a-z]+$/"], + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".pagination-next", + "pageE": "a.work", + "replaceE": ".pagination" + } + }, "JieAV": { "host": ["www.jieav.com","www.qinav.com","www.qinimg.com","www.yinmh.com","www.txtxi.com","www.dnaav.com","www.jiedm.com","www.ruav.xyz","www.feiav.com"], "url": "return fun.isPager('r')", @@ -5645,6 +6389,16 @@ "bF": "return fun.src_bF(pageE,[0,'img[img]','img'])" } }, + "tokyomotion": { + "host": "www.tokyomotion.net", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".prevnext", + "pageE": "(//div[@class='row']/div[@class='col-sm-12']/div[@class='row'])[last()]/div", + "replaceE": ".pagination" + } + }, "porn78.info": { "host": ["porn78.info","nyaa.porn78.info"], "url": "return fun.isPager('n')", @@ -5657,12 +6411,12 @@ }, "Netflav": { "host": "netflav.com", - "url": "return (fun.lp() != '/' && !fun.indexOF(/^\\/(video|actress|browse|genre)$/))", + "url": "fun.isUrlC(); return (fun.lp() != '/' && !fun.indexOF(/^\\/(video|actress|browse|genre)$/))", "blank": 3, "pager": { "type": 6, "nextL": "js; return fun.getNextEP('a.active.item+a.item:not(.icon)','page=',/page=\\d+/)", - "pageE": ".grid_cell", + "pageE": ".grid_0_cell", "replaceE": ".pagination", "loadTime": 1200, "scrollD": 3000 @@ -5698,6 +6452,16 @@ "replaceE": ".pagination" } }, + "AVJOY": { + "host": "avjoy.me", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".active+li.page-item>a", + "pageE": ".content-left>.content-row>div", + "replaceE": ".pagination" + } + }, "AV6K": { "host": "av6k.com", "url": "return (fun.lp() != '/' && !fun.indexOF('/search') && !fun.indexOF(/\\/\\d+\\.html$/))", @@ -5813,6 +6577,38 @@ "bF": "return fun.src_bF(pageE)" } }, + "TaSexy": { + "host": "www.tasexy.top", + "url": "return fun.isPager()", + "style": ".iframe,li[id^=sexy_]", + "blank": 3, + "pager": { + "nextL": "a.active+a", + "pageE": ".list_box>ul:nth-of-type(2)~ul", + "replaceE": ".pages" + } + }, + "caribbeancom": { + "host": ["www.caribbeancom.com","en.caribbeancom.com"], + "url": "return (fun.isPager()|fun.indexOF(/\\/(listpages|search)\\//))", + "blank": 3, + "pager": { + "nextL": "a[rel=next]", + "pageE": ".list>.flex-grid>.grid-item, .grid.is-movie>.entry", + "replaceE": ".pagination" + } + }, + "16k.club": { + "host": "www.16k.club", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "type": 6, + "nextL": ".m-pagination-next>a", + "pageE": ".container>.row.grid", + "replaceE": ".pagination" + } + }, "GGBases": { "host": "www.ggbases.com", "url": "return fun.isPager()", @@ -5933,7 +6729,7 @@ } }, "hanime1": { - "host": "hanime1.me", + "host": ["hanime1.me","hanimeone.me"], "url": "/^\\/search/", "blank": 3, "pager": { @@ -5947,7 +6743,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": { @@ -5962,7 +6758,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": { @@ -5985,8 +6781,8 @@ } }, "禁漫天堂": { - "host": ["18comic.vip","18comic.org","/^jm-?comic[0-9]?\\.[a-z]+$/"], - "url": "if (fun.indexOF(/^\\/photo\\//)){fun.src_bF(fun.getAllCSS('.scramble-page'),[0,'img[data-original]:not(.lazy-loaded)','data-original']); setTimeout(()=>{document.body.appendChild(document.createElement('script')).textContent = `var old_onImageLoaded = onImageLoaded; onImageLoaded = function(e){aid = parseInt(/photos\\\\/\\\\d+/.exec(e.src)[0].replace('photos/','')); if(aid>scramble_id){old_onImageLoaded(e);}}`},3000); return true}", + "host": ["18comic.vip","18comic.org","/^jmcomic-zzz.[a-z]+$/","/^18comic-[a-z]+.[a-z]+$/","/^jm-?comic[0-9]?\\.[a-z]+$/"], + "url": "if (fun.indexOF(/^\\/photo\\//)){setTimeout(()=>{document.body.appendChild(document.createElement('script')).textContent = `var old_onImageLoaded = onImageLoaded; onImageLoaded = function(e){aid = parseInt(/photos\\\\/\\\\d+/.exec(e.src)[0].replace('photos/','')); if(aid>scramble_id){old_onImageLoaded(e);}}`; fun.src_bF(fun.getAllCSS('.scramble-page'),[0,'img[data-original]:not(.lazy-loaded)','data-original']);},3000); return true}", "style": "[data-group],div[data-page],.thumb-overlay-albums>*:not(.scramble-page):not(.scramble-page1) {display: none !important;} #Comic_Top_Nav[style*='display: block'] {opacity: 0.3;}", "history": true, "pager": { @@ -6001,7 +6797,7 @@ } }, "禁漫天堂 - 分类页": { - "host": ["18comic.vip","18comic.org","/^jm-?comic[0-9]?\\.[a-z]+$/"], + "host": ["18comic.vip","18comic.org","/^jmcomic-zzz.[a-z]+$/","/^18comic-[a-z]+.[a-z]+$/","/^jm-?comic[0-9]?\\.[a-z]+$/"], "url": "/^\\/(albums|search|blogs|videos|movies)/", "style": ".row>[style='z-index: 0;'],.col-lg-3.col-md-3.col-sm-3.col-xs-6", "blank": 3, @@ -6041,12 +6837,13 @@ } }, "ACG漫画网": { - "host": ["acgmhs.com","www.acgmhs.com"], + "host": ["www.acgxmh.com","www.porn-comic.com","www.hentai-acg.com","/^(www\\.)?acgmh[a-z]\\.com$/"], "url": "return fun.isPager()", "style": ".pre_picture,.next_picture", "pager": { + "type": 3, "nextL": ".page>span+a:not(.a1)", - "pageE": ".manga-picture>picture,#list>li", + "pageE": ".manga-picture>picture,.manga-picture>img,#list>li", "replaceE": ".page" } }, @@ -6082,14 +6879,16 @@ "style": "#img {max-width: 100% !important;height: auto !important;min-height: 400px;}", "blank": 3, "pager": { - "nextL": "//table[@class='ptt']//a[string()='>'] | id('next') | id('unext')", - "pageE": ".itg>div,.itg>tbody>tr:not(:first-of-type),#gdt>div:not(.c),#img", - "replaceE": ".ptt,.ptb,.sn,.searchnav" + "type": 3, + "nextL": "//table[@class='ptb']//a[string()='>'] | (//a[@id='next'])[last()] | id('dnext')", + "pageE": ".itg>div,.itg>tbody>tr:not(:first-of-type),#gdt>*:not(.c),#img", + "replaceE": ".ptt,.ptb,.sn,.searchnav", + "scrollE": "//table[@class='ptb'] | (//a[@id='next'])[last()] | id('dnext')" } }, "nhentai": { - "host": ["nhentai.net","nhentai.to","nhentai.xxx"], - "url": "if (fun.indexOF(/^\\/g\\/\\d+\\/\\d+\\//)){const imageA = document.querySelector('#image-container>a'); imageA.outerHTML=imageA.innerHTML;return true;} else if (fun.getCSS('a.next') && fun.getCSS('.gallery')){return true;}", + "host": ["nhentai.net","nhentai.to","web.zorocdn.xyz"], + "url": "if (fun.indexOF(/^\\/g\\/\\d+\\/\\d+\\//)){const imageA = document.querySelector('#image-container>a'); imageA.outerHTML=imageA.innerHTML;return true;} else {return (fun.getCSS('a.next') && fun.getCSS('.gallery'));}", "style": "section#image-container img {max-width: 100% !important;height: auto !important;display: block !important;margin: 0 auto !important;}", "blank": 3, "pager": { @@ -6101,6 +6900,78 @@ "bF": "if (fun.getCSS('.container>.gallery') && typeof _n_app !== 'undefined' && _n_app.options.blacklisted_tags != null && _n_app.options.blacklisted_tags.length != 0) {pageE.forEach(function (one) {let tags = one.dataset.tags.split(' ');for (let i=0; i < tags.length; i++){for (let ii=0; ii < _n_app.options.blacklisted_tags.length; ii++){if (tags[i] == _n_app.options.blacklisted_tags[ii]) {one.classList.add('blacklisted');};};};});}; return fun.src_bF(pageE)" } }, + "nhentai.xxx": { + "host": "nhentai.xxx", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": "li.active+li:not(.disabled)>a", + "pageE": ".gallery_item", + "replaceE": ".pagination" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, + "nhentai.xxx - g": { + "host": "nhentai.xxx", + "url": "if(fun.indexOF(/^\\/g\\/\\d+\\/\\d+\\//)){const imageA = fun.getCSS('.fw_img');imageA.outerHTML=imageA.innerHTML;return true;}", + "style": ".pg_prv,.pg_nxt", + "pager": { + "nextL": "js;return fun.getNextUPN(/^\\/g\\/\\d+\\/(\\d+)\\//,/\\/(\\d+)\\/$/,'/','/','2',fun.getCSS('.tp').textContent)", + "pageE": "#fimg", + "replaceE": ".reader_nav" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, + "HentaiFox": { + "host": "hentaifox.com", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".active+li.page-item:not(.disabled)>a", + "pageE": ".lc_galleries>.thumb", + "replaceE": ".pagination" + } + }, + "HentaiFox-g": { + "host": "hentaifox.com", + "url": "if(fun.indexOF(/^\\/g\\/\\d+\\/\\d+\\//)){const a=fun.getCSS('#gimg');a.parentElement.outerHTML=a.outerHTML;return true;}", + "style": ".page_next,.page_prev,.gallery_pagination", + "pager": { + "nextL": "js; return fun.getNextUPN(/^\\/g\\/\\d+\\/(\\d+)/,/(?<=^\\/g\\/\\d+)\\/\\d+\\//,'/','/','2',fun.getCSS('.total_pages').textContent)", + "pageE": ".full_image img" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, + "HentaiEra": { + "host": "hentaiera.com", + "url": "return fun.isPager()", + "style": ".blacklisted {z-index: 0;opacity: 1;-webkit-filter: none;filter: none;pointer-events: auto;}", + "blank": 3, + "pager": { + "nextL": ".pgi_itm.active+li.pgi_itm:not(.disabled)>a", + "pageE": ".thumb", + "replaceE": ".pagination" + } + }, + "HentaiEra-gallery": { + "host": "hentaiera.com", + "url": "/^\\/gallery\\/\\d+/", + "hiddenPN": true + }, + "HentaiEra-view": { + "host": "hentaiera.com", + "url": "if(fun.indexOF(/^\\/view\\/\\d+\\/\\d+\\//)){const a=fun.getCSS('#gimg');a.src=a.dataset.src;a.parentElement.outerHTML=a.outerHTML;window.scrollTo=()=>{return false;};return true;}", + "style": ".page_next,.page_prev,.nav_pagination,#footer_bar", + "pager": { + "nextL": "js; const next = fun.getCSS('.nav_next:not([disabled])');if(next){let gimg = fun.getCSS('#gimg'),gimg_clone = gimg.cloneNode();gimg_clone.src='';gimg.insertAdjacentElement('afterend', gimg_clone);gimg.id='';next.click();fun.pageNumIncrement();}" + } + }, "9hentai": { "host": "www1.9hentai.com", "url": "/^\\/g\\/\\d+\\/\\d+\\//", @@ -6109,10 +6980,19 @@ "nextL": "a[data-target='#jumpPageModal']+a", "pageE": "#img-reader", "replaceE": ".viewer-control", - "scrollD": 2000, "loadTime": 500 } }, + "xxxclub": { + "host": "xxxclub.to", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".browsepagination>a:not(.page-link)", + "pageE": ".browsetableinside>ul>li:not(:first-child)", + "replaceE": ".browsepagination" + } + }, "Orzqwq": { "host": "orzqwq.com", "url": "if(fun.indexOF(/\\/p\\/\\d\\/$/)){let t = setInterval(()=>{if(typeof chapter_preloaded_images !== 'undefined'){let _img=''; for (let i=0;i<=chapter_preloaded_images.length;i++){_img += ``;}; document.querySelector('.reading-content').innerHTML = _img;clearInterval(t);}},500); return true;}", @@ -6120,11 +7000,10 @@ }, "hitomi": { "host": "hitomi.la", - "url": "if(fun.indexOF('/reader/')){setTimeout(()=>{let _img='
';for (let i=0;i<2;i++){_img += ``;};document.getElementById('comicImages').outerHTML = _img+'
';window.imgIndex = 1;},500);return true;}", + "url": "if(fun.indexOF('/reader/')){window.imgIndex = 1;return true;}", "style": "body {height: auto !important; overflow: auto !important;} #comicImages.fitVertical img {margin: 0 auto;display: block;max-height: calc(1000px - 41px);} .navbar-static-top {display: none;}", "pager": { - "nextL": "js;if(window.imgIndex +1 >= our_galleryinfo.length){return}; document.getElementById('comicImages').insertAdjacentHTML('beforeend',``); window.imgIndex+=1;", - "scrollD": 1000 + "nextL": "js;if(window.imgIndex +1 >= our_galleryinfo.length){return}; document.getElementById('comicImages').insertAdjacentHTML('beforeend',``);window.imgIndex+=1;fun.pageNumIncrement();" } }, "MANGA1000": { @@ -6187,6 +7066,7 @@ "Danbooru": { "host": ["danbooru.donmai.us","e621.net"], "url": "return (fun.lp() == '/' || fun.lp() == '/posts')", + "style": ".post-preview:not(.blacklist-initialized),.image-container:not(.blacklist-initialized){visibility: initial !important;}", "blank": 3, "pager": { "nextL": "a[rel='next']", @@ -6194,6 +7074,51 @@ "replaceE": ".paginator" } }, + "kemono.su": { + "host": "kemono.su", + "url": "/^\\/(posts|patreon|artists)/", + "blank": 3, + "pager": { + "type": 6, + "nextL": "a.next", + "pageE": ".card-list__items", + "replaceE": ".paginator>menu", + "loadTime": 1000 + } + }, + "BepisDB": { + "host": "db.bepis.moe", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".page-item.active+li>a", + "pageE": "#inner-card-body>div", + "replaceE": ".pagination" + } + }, + "xchina.co": { + "host": ["xchina.co","/^xchina\\.[a-z]+$/","crxs.me","litu100.xyz","8se.me","shise.me"], + "url": "return fun.isPager()", + "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.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", + "scrollD": 1000 + } + }, + "西斯新聞": { + "host": "sexynews.gamme.com.tw", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".navi-next", + "pageE": ".List-4", + "replaceE": ".navi-pages" + } + }, "Hentai Foundry": { "host": "www.hentai-foundry.com", "url": "return (fun.lp() != '/' && fun.isPager('p'))", @@ -6283,8 +7208,9 @@ } }, "绅士漫画": { - "host": ["/^(www\\.)?(wnacg|htcomic)\\./","/^(www\\.)?qy\\d\\.ru/"], + "host": ["/^(www\\.)?(wnacg|htcomic)(\\d+)?\\.[a-z]+$/","/^(www\\.)?(qy|wn)\\d+\\.[a-z]+$/"], "url": "/^\\/(albums|search|photos-index)/", + "style": "a.btn[href^='/photos-slide-']{color:#fff !important;background:#ff604a !important;font-weight:bold !important;font-size:22px !important;letter-spacing:10px !important;width:210px !important;height:30px !important;}", "blank": 3, "pager": { "nextL": "span.thispage+a", @@ -6292,6 +7218,72 @@ "replaceE": ".paginator" } }, + "绅士漫画 - 阅读页(非下拉阅读)": { + "host": ["/^(www\\.)?(wnacg|htcomic)(\\d+)?\\.[a-z]+$/","/^(www\\.)?(qy|wn)\\d+\\.[a-z]+$/"], + "url": "if(fun.indexOF(/^\\/photos-view-id-\\d+\\.html/) || fun.indexOF('?ctl=photos&act=view&id=','s')){const img=fun.getCSS('#picarea');img.parentElement.outerHTML=img.outerHTML;return true;}", + "style": "#tuzaoblock,#bodywrap,.tocaowrap", + "pager": { + "nextL": "js;const next=fun.getCSS('.pageselect>[selected]+option');if(next){return location.href.replace(/\\d+/,next.value);}", + "pageE": "#picarea", + "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" + } + }, + "色漫天堂": { + "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/", + "pager": { + "nextL": "#k_Pic_nextArr", + "pageE": "#m_r_imgbox_0 img", + "replaceE": "#action" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, "灵梦御所": { "host": "blog.reimu.net", "url": "return (!fun.indexOF('/post/') && !fun.getCSS('#comments,.comments-area,#disqus_thread'))", @@ -6311,6 +7303,19 @@ "replaceE": "nav[role=navigation]" } }, + "fulitu.cc": { + "host": "www.fulitu.cc", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".next>a", + "pageE": "#masonry>.item", + "replaceE": ".page-navigator" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, "xiutaku": { "host": "xiutaku.com", "url": "return fun.isPager()", @@ -6370,11 +7375,34 @@ } }, "爱妹子": { - "host": "xx.knit.bid", + "host": ["xx.knit.bid","www.lovecutes.com"], + "url": "return fun.getCSS('li.active+li>a')", + "blank": 4, "pager": { - "type": 2, - "nextL": ".ias_trigger>a", - "scrollD": 3000 + "type": 3, + "nextL": "js; return fun.getNextEPN('li.active+li>a',/page\\/\\d+\\//,'page/','/')", + "pageE": ".image-container>article, .image-container>.item-image", + "replaceE": ".pagination" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, + "chottie": { + "host": "chottie.com", + "url": "if (fun.indexOF(/^\\/blog\\/archives/)){fun.insStyle('div[pagetotal]>div>div {display: block !important;} a>.v-image {width: auto !important;}');setTimeout(()=>{fun.getCSS('.v-btn-toggle>button:last-of-type').click();},1000)}" + }, + "XiuRenBox": { + "host": "www.xiurenbox.com", + "url": "return fun.isPager()", + "style": ".page-click-zone", + "pager": { + "nextL": ".next", + "pageE": ".wp-block-image>img", + "replaceE": ".simple-page-nav" + }, + "function": { + "bF": "return fun.src_bF(pageE, [0,'img[data-lazy-src]','data-lazy-src'])" } }, "MrCong": { @@ -6399,6 +7427,33 @@ "bF": "return fun.src_bF(pageE)" } }, + "foamgirl": { + "host": "foamgirl.net", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".page-numbers.current+a:not(.prev)", + "pageE": ".imageclick-imgbox,#index_ajax_list>li", + "replaceE": ".nav-links" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, + "74P福利社": { + "host": "www.74p.net", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "type": 3, + "nextL": "a.next.page-numbers", + "pageE": "#image_div>p>img,#index_ajax_list>li", + "replaceE": ".nav-links" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, "美图乐": { "host": "meitulu.cc", "url": "return fun.isPager()", @@ -6455,6 +7510,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$)/))", @@ -6465,6 +7530,16 @@ "replaceE": ".page" } }, + "xiurentu.pics": { + "host": "xiurentu.pics", + "url": "return fun.isPager()", + "pager": { + "type": 3, + "nextL": "a[rel=next]", + "pageE": "img.block.my-1,#main>.grid.gap-3.grid-cols-2.md\\:grid-cols-3.lg\\:grid-cols-4>div", + "replaceE": "nav[role=navigation]" + } + }, "美人图": { "host": "/^meirentu\\..+/", "url": "return fun.isPager()", @@ -6562,6 +7637,12 @@ "replaceE": "#dm-fy" } }, + "凸凹吧 tuao.cc": { + "host": "www.tuao.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\\//", @@ -6583,7 +7664,7 @@ } }, "24FA": { - "host": ["/^(www\\.)?24fa\\.[a-z]+$/","/^(www\\.)?24fa.?\\.com$/","/^(www\\.)?\\d{3}w\\.cc$/","/^(www\\.)?\\d{3}\\.(mom|one)$"], + "host": ["/^(www\\.)?24fa\\.[a-z]+$/","/^(www\\.)?24fa.?\\.com$/","/^(www\\.)?24[a-z]{2}\\.cc$/","/^(www\\.)?\\d{3}w\\.cc$/","/^(www\\.)?\\d{3}\\.(mom|one)$"], "url": "return (fun.isTitle('24FA') && fun.isPager())", "style": ".moreR {display: none;} #content img {width: auto; max-width: 99%; height: auto; display: block; margin: 0 auto;}", "pager": { @@ -6593,6 +7674,16 @@ "scrollD": 3500 } }, + "missbby.com": { + "host": "missbby.com", + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "type": 3, + "nextL": ".justify-center.items-center+div>a.bg-pink-500+a, .flex.space-x-2>a.hover\\:bg-pink-500", + "pageE": "//div[@class='md:px-16 xl:px-20 max-w-3xl mx-auto justify-center items-center flex flex-col min-h-screen']/div | (//div[@class='mx-auto max-w-7xl px-4' or @id='S:0']//div[@class='grid grid-cols-1 md:grid-cols-3 gap-y-6 gap-x-4 xl:grid-cols-4'])[last()]/div" + } + }, "遛无写真": { "host": "www.6evu.com", "url": "/^\\/\\d+\\.html/", @@ -6724,6 +7815,19 @@ "replaceE": "#d_list_page,#d_list_foot,table.dc_bar" } }, + "Theav": { + "host": ["theavporn.com","the01.fun","/^theav\\d{3}\\.com/","/^thepa\\d{2}\\.xyz$/","/^tav\\d{3}\\.xyz$/"], + "url": "return fun.isPager()", + "blank": 3, + "pager": { + "nextL": ".pagination>.item.active+div[class=item]>a", + "pageE": ".thumbs>.thumb", + "replaceE": ".pagination" + }, + "function": { + "bF": "return fun.src_bF(pageE)" + } + }, "taotuxp.com": { "host": "www.taotuxp.com", "url": "/^\\/\\d+\\.html/", @@ -6733,6 +7837,16 @@ "replaceE": ".pagelist" } }, + "4khd.com": { + "host": ["4khd.com","www.4khd.com","/^(.+)\\.xxtt\\.ink$/","/^(.+)\\.uuss\\.uk$/"], + "url": "/^\\/content\\//", + "pager": { + "type": 3, + "nextL": ".numpages.current+li>a", + "pageE": "#basicExample>a", + "replaceE": ".page-links" + } + }, "俊美图": { "host": "www.meijuntu.com", "url": "return fun.isPager('r')", @@ -6743,5 +7857,32 @@ "pageE": ".pictures>img,.pic-list>ul", "replaceE": ".pages" } + }, + "愛麗絲書屋 - 分类/搜索": { + "host": ["www.alicesw.com","www.alicesw.tw","/^(.+)\\.(alicesw2|als1006)\\.([a-z]+)$/"], + "url": "/^\\/(lists|search\\.html)/", + "pager": { + "nextL": ".layui-laypage-next,.active+li>a", + "pageE": ".list-group-item,.rec_rullist>ul,ul.txt-list>li", + "replaceE": ".pagination,.pager" + } + }, + "黑料网": { + "host": ["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": { + "nextL": "a.next", + "pageE": ".video-item" + } + }, + "子夜动漫/七味网 类通用规则": { + "url": "return fun.isPager()", + "pager": { + "nextL": ".page-active+a", + "pageE": ".content-list>li", + "replaceE": ".pages" + } } }