小修bug

This commit is contained in:
xing 2020-07-12 20:26:21 +08:00
parent 8538e36633
commit 14f3ec7dd5

View File

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name tieba page // @name tieba page
// @namespace http://tampermonkey.net/ // @namespace http://tampermonkey.net/
// @version 1.009 // @version 1.010
// @author fthvgb1 // @author fthvgb1
// @match https://tieba.baidu.com/* // @match https://tieba.baidu.com/*
// @match https://tiebac.baidu.com/* // @match https://tiebac.baidu.com/*
@ -280,7 +280,7 @@
let tmp = lis.querySelectorAll('li'); let tmp = lis.querySelectorAll('li');
let arr = [...tmp]; let arr = [...tmp];
arr.splice(tmp.length - 1, 1); arr.splice(tmp.length - 1, 1);
if (page === 1 && el.length > 0) { if (page === 1 && el.childElementCount > 0) {
arr.splice(0, 2); arr.splice(0, 2);
} }
arr.forEach(li => { arr.forEach(li => {