diff --git a/Autopage.user.js b/Autopage.user.js index cf0eb67..f1f04d4 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -3,7 +3,7 @@ // @name:zh-CN 自动无缝翻页 // @name:zh-TW 自動無縫翻頁 // @name:en AutoPager -// @version 5.4.1 +// @version 5.4.2 // @author X.I.U // @description ⭐无缝衔接下一页内容到网页底部(类似瀑布流)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、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...) 等網站~ @@ -3468,6 +3468,14 @@ function: { var beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop, fn = fn1 || function () {}; setTimeout(function () { // 延时 1 秒执行,避免刚载入到页面就触发翻页事件 + + // 避免网页内容太少,高度撑不起来,不显示滚动条而无法触发翻页事件 + let scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop, + scrollHeight = window.innerHeight || document.documentElement.clientHeight + if (scrollTop === 0 && document.documentElement.scrollHeight === scrollHeight) { + insStyle(`html, body {min-height: ${document.documentElement.scrollHeight+10}px;}`) + } + window.addEventListener('scroll', function (e) { var afterScrollTop = document.documentElement.scrollTop || document.body.scrollTop, delta = afterScrollTop - beforeScrollTop; diff --git a/other/Autopage/rules.json b/other/Autopage/rules.json index 85dafbd..233ac73 100644 --- a/other/Autopage/rules.json +++ b/other/Autopage/rules.json @@ -2737,7 +2737,6 @@ "哔哩轻小说 - 手机版": { "host": "w.linovelib.com", "url": "return (fun.indexOF(/\\/novel\\/\\d+\\/.+\\.html/))", - "style": "body {min-height: 1000px;}", "pager": { "nextL": "js;if (ReadParams) {return (location.origin + ReadParams.url_next)}; return '';", "pageE": "id('apage')/div | //body/script[contains(text(), 'var ReadParams')]", @@ -3746,7 +3745,7 @@ }, "OI-Wiki": { "host": "oi-wiki.org", - "style": "blockquote.page-copyright, h2#__comments, form#gitalk-form {display: none !important;} article.md-content__inner{min-height: 700px;}", + "style": "blockquote.page-copyright, h2#__comments, form#gitalk-form {display: none !important;}", "pager": { "nextL": "li.md-nav__item.md-nav__item--active.md-nav__item--nested li.md-nav__item--active+li a", "pageE": "article.md-content__inner", @@ -4060,7 +4059,7 @@ "yande": { "host": ["konachan.net","konachan.com","yande.re"], "url": "if (fun.indexOF('/post')) {document.head.appendChild(document.createElement('base')).target = '_blank'; return true;}", - "style": "html, body {min-height: 1000px;} .javascript-hide {display: inline-block !important;} ul#post-list-posts img, ul#post-list-posts .inner{width: auto !important; height: auto !important;} ul#post-list-posts li {width: 33% !important;} a.directlink {margin: 0 !important;}", + "style": ".javascript-hide {display: inline-block !important;} ul#post-list-posts img, ul#post-list-posts .inner{width: auto !important; height: auto !important;} ul#post-list-posts li {width: 33% !important;} a.directlink {margin: 0 !important;}", "pager": { "nextL": "a.next_page", "pageE": "ul#post-list-posts > li",