From 255b6f00c0df2ece03f8ea847e84ffd3d9900771 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 30 Mar 2021 10:47:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=81=B6=E5=B0=94?= =?UTF-8?q?=E4=BC=9A=E6=97=A0=E6=B3=95=E6=BB=9A=E5=8A=A8=E5=88=B0=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E5=86=85=E5=AE=B9=E7=9A=84=E9=97=AE=E9=A2=98;?= =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E8=A7=84=E8=8C=83=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhiyoo-Enhanced.user.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Zhiyoo-Enhanced.user.js b/Zhiyoo-Enhanced.user.js index 5dfe12c..573f7f5 100644 --- a/Zhiyoo-Enhanced.user.js +++ b/Zhiyoo-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 智友邦论坛增强 -// @version 1.1.6 +// @version 1.1.7 // @author X.I.U // @description 自动签到、自动回复、自动无缝翻页、清理置顶帖子、简化附件兑换/下载、清理帖子标题〖XXX〗【XXX】文字 // @icon http://bbs.zhiyoo.net/favicon.ico @@ -210,9 +210,9 @@ writeReply(); // 如果使用了我的 [智友邦美化] 脚本,则定位至底部,反之定位至隐藏内容区域 if (document.getElementById("fastpostmessage").offsetParent == null){ - setTimeout(`window.scrollTo(0,99999999)`, 500); + setTimeout(function(){window.scrollTo(0,99999999)}, 1000); }else{ - setTimeout(`window.scrollTo(0,document.querySelector('.showhide').offsetTop)`, 500); + setTimeout(function(){window.scrollTo(0,document.querySelector('.showhide').offsetTop)}, 1000); } } } @@ -226,9 +226,9 @@ // 随机写入回复内容 textarea.value = textarea.value + replyList[Math.floor((Math.random()*replyList.length))] + replyList[Math.floor((Math.random()*replyList.length))]; //console.log(`${textarea.value}`) - var fastpostsubmit = document.getElementById("fastpostsubmit"); + let fastpostsubmit = document.getElementById("fastpostsubmit"); if (fastpostsubmit){ - setTimeout(`fastpostsubmit.click()`, 200); + setTimeout(function(){fastpostsubmit.click()}, 200); } } } @@ -242,11 +242,9 @@ if (document.getElementsByClassName("showhide").length > 0){ // 如果使用了我的 [智友邦美化] 脚本,则定位至底部,反之定位至隐藏内容区域 if (document.getElementById("fastpostmessage").offsetParent == null){ - setTimeout(`window.scrollTo(0,99999999)`, 500); - console.log("111") + setTimeout(function(){window.scrollTo(0,99999999)}, 1000); }else{ - setTimeout(`window.scrollTo(0,document.querySelector('.showhide').offsetTop)`, 500); - console.log("222") + setTimeout(function(){window.scrollTo(0,document.querySelector('.showhide').offsetTop)}, 1000); } } }