优化 代码(自动无缝翻页相关)

This commit is contained in:
xiu2
2021-08-18 19:03:53 +08:00
parent db1025e23b
commit f6b5aaa138
5 changed files with 12 additions and 22 deletions
+2 -4
View File
@@ -288,10 +288,8 @@
// 修改自 https://greasyfork.org/scripts/14178 , https://github.com/machsix/Super-preloader
var ShowPager = {
getFullHref: function (e) {
if(e == null) return '';
'string' != typeof e && (e = e.getAttribute('href'));
var t = this.getFullHref.a;
return t || (this.getFullHref.a = t = document.createElement('a')), (t.href = e), t.href;
if (e != null && e.nodeType === 1 && e.href && e.href.slice(0,4) === 'http') return e.href;
return '';
},
createDocumentByString: function (e) {
if (e) {
+2 -4
View File
@@ -277,10 +277,8 @@
function showPager() {
ShowPager = {
getFullHref: function (e) {
if(e == null) return '';
'string' != typeof e && (e = e.getAttribute('href'));
var t = this.getFullHref.a;
return t || (this.getFullHref.a = t = document.createElement('a')), (t.href = e), t.href;
if (e != null && e.nodeType === 1 && e.href && e.href.slice(0,4) === 'http') return e.href;
return '';
},
createDocumentByString: function (e) {
if (e) {
+2 -4
View File
@@ -567,10 +567,8 @@
// 修改自 https://greasyfork.org/scripts/14178 , https://github.com/machsix/Super-preloader
var ShowPager = {
getFullHref: function (e) {
if(e == null) return '';
'string' != typeof e && (e = e.getAttribute('href'));
var t = this.getFullHref.a;
return t || (this.getFullHref.a = t = document.createElement('a')), (t.href = e), t.href;
if (e != null && e.nodeType === 1 && e.href && e.href.slice(0,4) === 'http') return e.href;
return '';
},
createDocumentByString: function (e) {
if (e) {
+4 -6
View File
@@ -325,7 +325,7 @@
if (event.target==this) {
if (document.querySelector('.box.reply-box-sticky')) {
document.getElementById('undock-button').click();
}else{
} else {
let _top = document.body.scrollTop + document.documentElement.scrollTop;
document.getElementById('reply_content').focus();
window.scrollTo(0,_top);console.log(_top);
@@ -336,7 +336,7 @@
/*document.getElementById('reply_233').onclick = function () {
if (document.querySelector('.box.reply-box-sticky')) {
document.getElementById('undock-button').click();
}else{
} else {
let _top = document.body.scrollTop + document.documentElement.scrollTop;
document.getElementById('reply_content').focus();
window.scrollTo(0,_top);console.log(_top);
@@ -405,10 +405,8 @@
// 修改自 https://greasyfork.org/scripts/14178 , https://github.com/machsix/Super-preloader
var ShowPager = {
getFullHref: function (e) {
if(e == null) return '';
'string' != typeof e && (e = e.getAttribute('href'));
var t = this.getFullHref.a;
return t || (this.getFullHref.a = t = document.createElement('a')), (t.href = e), t.href;
if (e != null && e.nodeType === 1 && e.href && e.href.slice(0,4) === 'http') return e.href;
return '';
},
createDocumentByString: function (e) {
if (e) {
+2 -4
View File
@@ -352,10 +352,8 @@
// 修改自 https://greasyfork.org/scripts/14178 , https://github.com/machsix/Super-preloader
var ShowPager = {
getFullHref: function (e) {
if(e == null) return '';
'string' != typeof e && (e = e.getAttribute('href'));
var t = this.getFullHref.a;
return t || (this.getFullHref.a = t = document.createElement('a')), (t.href = e), t.href;
if (e != null && e.nodeType === 1 && e.href && e.href.slice(0,4) === 'http') return e.href;
return '';
},
createDocumentByString: function (e) {
if (e) {