From f75f42cf08558fbdc862764dae60b36aa6b4e4fa Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 4 Mar 2022 19:56:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=9B=9E=E5=88=B0?= =?UTF-8?q?=E9=A1=B6=E9=83=A8]=20=E5=8A=9F=E8=83=BD(=E5=8F=B3=E9=94=AE?= =?UTF-8?q?=E5=B7=A6=E4=B8=8B=E8=A7=92=E9=A1=B5=E7=A0=81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 18 ++++++++++++++---- other/Autopage/rules.json | 6 ++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index d7e3123..d4d69d9 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -3,7 +3,7 @@ // @name:zh-CN 自动无缝翻页 // @name:zh-TW 自動無縫翻頁 // @name:en AutoPager -// @version 5.1.8 +// @version 5.1.9 // @author X.I.U // @description 无缝追加下一页内容(瀑布流),目前支持:【所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP」论坛】【百度、谷歌、必应、搜狗、微信、360、Yahoo、Yandex 等搜索引擎】、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、煎蛋网、糗事百科、龙的天空、起点中文、IT之家、千图网、Pixabay、Pixiv、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、小众软件、【动漫狂、漫画猫、漫画屋、漫画 DB、动漫之家、拷贝漫画、包子漫画、Mangabz、Xmanhua 等漫画网站】、PubMed、Z-Library、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了... // @description:zh-TW 無縫追加下一頁內容(瀑布流),支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎等網站~ @@ -3310,16 +3310,26 @@ function: { } // 插入网页 let _style = ``, - _html = `
${pageNum._now}
` + _html = `
${pageNum._now}
` document.documentElement.insertAdjacentHTML('beforeend', _style + _html); // 解决 远景论坛 会清理掉前面插入的 CSS 样式的问题 if (location.hostname === 'bbs.pcbeta.com') {setTimeout(function(){document.documentElement.insertAdjacentHTML('beforeend', _style);}, 500);} if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage - // 点击事件(临时暂停翻页) - getCSS('#Autopage_number').onclick = function () { + // 左键点击事件(临时暂停翻页) + getCSS('#Autopage_number').onclick = function(e) { if (pausePage) {this.style = 'color: #FF5722 !important; font-style: italic !important;';} else {this.style = '';} pausePage = !pausePage; if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage + e.preventDefault(); + e.stopPropagation(); + return false + }; + // 右键点击事件(回到顶部) + getCSS('#Autopage_number').oncontextmenu = function(e) { + window.scrollTo(0,0); + e.preventDefault(); + e.stopPropagation(); + return false }; status = getCSS('#Autopage_number'); set(); diff --git a/other/Autopage/rules.json b/other/Autopage/rules.json index d1a4139..080aeb9 100644 --- a/other/Autopage/rules.json +++ b/other/Autopage/rules.json @@ -1205,8 +1205,7 @@ "pager": { "type": 2, "nextL": "button.so-pablo-button", - "interval": 1500, - "scrollD": 1500 + "interval": 1500 } }, "素材中国": { @@ -1283,8 +1282,7 @@ "pager": { "nextL": "li.next > a", "pageE": ".collect-list > div", - "replaceE": ".pagerbar", - "scrollD": 1500 + "replaceE": ".pagerbar" } }, "普象网 - 作品集/搜索页": {