From 847a0c6499b8ed7be6e736dd71c9d2d1dba085a3 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 17 Nov 2021 10:10:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E6=B7=98=E8=82=A1?= =?UTF-8?q?=E5=90=A7]=20=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 69 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 2 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index df09b9a..a2766cf 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 3.4.6 +// @version 3.4.7 // @author X.I.U // @description 无缝拼接下一页内容(瀑布流),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、DUX/XIU/D8/Begin(WP主题)」网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、微博、NGA、V2EX、B 站(Bilibili)、蓝奏云、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、片库、茶杯狐、NO视频、低端影视、奈菲影视、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画 DB、动漫之家、拷贝漫画、包子漫画、古风漫画网、Mangabz、PubMed、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了... // @match *://*/* @@ -29,7 +29,7 @@ ['menu_discuz_thread_page', '帖子内自动翻页', '帖子内自动翻页', true], ['menu_page_number', '显示当前页码及点击暂停翻页', '显示当前页码及点击暂停翻页', true], ['menu_pause_page', '左键双击网页空白处暂停翻页', '左键双击网页空白处暂停翻页', false] - ], menuId = [], webType = 0, curSite = {SiteTypeID: 0}, DBSite, SiteType, pausePage = true, pageNum = {now: 1, _now: 1}, locationChange = false, nowLocation = '', forumWebsite = ['cs.rin.ru', 'www.flyert.com', 'bbs.pediy.com', 'www.libaclub.com', 'tieba.baidu.com', 'www.cadtutor.net', 'www.theswamp.org', 'www.xuexiniu.com', 'bbs.xuexiniu.com']; + ], menuId = [], webType = 0, curSite = {SiteTypeID: 0}, DBSite, SiteType, pausePage = true, pageNum = {now: 1, _now: 1}, locationChange = false, nowLocation = '', forumWebsite = ['cs.rin.ru', 'www.flyert.com', 'bbs.pediy.com', 'www.libaclub.com', 'tieba.baidu.com', 'www.cadtutor.net', 'www.theswamp.org', 'www.xuexiniu.com', 'bbs.xuexiniu.com', 'www.taoguba.com.cn']; for (let i=0;i -1) { + curSite = DBSite.taoguba_t; + } else if (location.pathname.indexOf('/shenghuoba/') > -1) { + curSite = DBSite.taoguba_; + } else if (/\/bbs|zongban|dianzan|jinghua\//.test(location.pathname)) { + curSite = DBSite.taoguba; + }}, + pager: { + type: 1, + nextL: function() { + let next = getXpath('//div[contains(@class, "t_page01")]/a[contains(text(), "下一页")]'), next_ = '/'; + if (next) { + next = next.getAttribute('onclick').replace('gotoPage(','').replace(')','').split(','); + if (/\/dianzan|jinghua\//.test(location.pathname)) next_ = '-'; + if (parseInt(next[0]) <= parseInt(next[2])) {return (`${location.origin}/${location.pathname.split('/')[1]}/${next[0]}${next_}${next[1]}`)} + } + return ''; + }, + pageE: 'css;.p_list > .p_list01[class*="user_"]', + insertP: ['//div[@class="p_list"][./div[contains(@class, "user_")]]', 3], + replaceE: 'css;.t_page', + scrollD: 1000 + } + }, // 淘股吧论坛 + taoguba_: { + pager: { + type: 1, + nextL: function() { + let next = 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: 'css;.lifeContent-topicList-item', + insertP: ['//div[@class="lifeContent-topicList"]//div[@class="lifeContent-topicList-item"][last()]', 4], + replaceE: 'css;.N_sortPage ', + scrollD: 1000 + } + }, // 淘股吧论坛 - 生活圈 + taoguba_t: { + pager: { + type: 1, + nextL: function() { + let next = 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/${getCSS("#looktopicID").value}/${next[0]}`)} + } + return ''; + }, + pageE: 'css;div[id^="reply_"]', + insertP: ['css;#new_wrap_container', 3], + replaceE: 'css;.t_page', + scrollD: 1000 + }, + function: { + bF: src_bF, + pF: [0, 'img[data-original]', 'data-original'] + } + }, // 淘股吧论坛 - 帖子内 lowendtalk: { host: 'lowendtalk.com', pager: {