Skip to content

Commit 0fbef79

Browse files
committed
修复 关闭 [显示当前页码] 后无法翻第三页的问题
1 parent 4233957 commit 0fbef79

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Autopage.user.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name 自动无缝翻页
3-
// @version 1.9.1
3+
// @version 1.9.2
44
// @author X.I.U
55
// @description 无缝拼接下一页内容,目前支持:[所有使用「Discuz!、Flarum、DUX(WordPress)」的网站]、百度、谷歌、必应、贴吧、豆瓣、微博、NGA(玩家社区)、V2EX、超能网、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、小霸王其乐无穷、茶杯狐、NO视频、低端影视、奈菲影视、91美剧网、真不卡影院、片库、音范丝、BT之家、爱恋动漫、Nyaa、SrkBT、RARBG、423Down、不死鸟、小众软件、极简插件、果核剥壳、六音软件、微当下载、th-sjy 汉化、异次元软件、老殁殁漂遥、异星软件空间、动漫狂、漫画DB、HiComic(嗨漫画)、古风漫画网、砂之船动漫家、PubMed、wikiHow、GreasyFork、CS.RIN.RU、FitGirl...
66
// @match *://*/*
@@ -2192,14 +2192,15 @@
21922192
let _html = `<style>#Autopage_number {top: calc(75vh) !important;left: 0 !important;width: 32px;height: 32px;padding: 6px !important;display: flex;position: fixed !important;opacity: 0.5;transition: .2s;z-index: 1000 !important;cursor: pointer;user-select: none !important;flex-direction: column;align-items: center;justify-content: center;box-sizing: content-box;border-radius: 0 50% 50% 0;transform-origin: center !important;transform: translateX(-8px);background-color: #eeec;-webkit-tap-highlight-color: transparent;box-shadow: 1px 1px 3px 0px #989898 !important;color: #000 !important;} #Autopage_number:hover {opacity: 1;transform: translateX(0);}</style>
21932193
<div id="Autopage_number" title="当前页码&#10;&#10;(可在 [自动无缝翻页] 脚本菜单中关闭)">${pageNum._now}</div>`
21942194
document.body.insertAdjacentHTML('beforeend', _html);
2195+
status = document.getElementById('Autopage_number');
21952196
set();
21962197
}
21972198
// 监听储存当前页码的对象值的变化
21982199
function set(){
21992200
Object.defineProperty(pageNum, 'now', {
22002201
set: function(value) {
22012202
this._now = value;
2202-
document.getElementById('Autopage_number').textContent = value;
2203+
if (status) status.textContent = value;
22032204
}
22042205
});
22052206
}

0 commit comments

Comments
 (0)