-
-
Save wisecsj/41e83d914fd8a9e61596c1a41e78f1af to your computer and use it in GitHub Desktop.
实验楼实验环境下自动延迟JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setInterval(() => { | |
// 显示时间的节点 | |
var timeNode = document.querySelector(".left-time > div:nth-child(1)") | |
var lastTime = parseInt(timeNode.textContent) | |
// 延迟按钮 | |
var btn = document.querySelector(".add-time-btn") | |
if (lastTime<10) { | |
btn.click() | |
// 确认延迟按钮 | |
var sure = document.querySelector("#__BVID__65___BV_modal_footer_ > button:nth-child(2)") | |
sure.click() | |
} | |
}, 5000); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
每次很容易错过点击延迟的时间,导致又得重新申请实验空间,配置环境,非常苦恼。