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); } } }