Last active
May 25, 2021 17:08
-
-
Save SLAPaper/8a08e7dbb79881633c98819db1aacec4 to your computer and use it in GitHub Desktop.
Auto get score in https://my.qidian.com/level
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
// ==UserScript== | |
// @name Qidian score autoclick | |
// @name:ZH-CN 起点中文经验值自动签到 | |
// @namespace http://tampermonkey.net/ | |
// @version 1.9 | |
// @description Open the score site and let the script do all the click! | |
// @description:ZH-CN 打开领取经验值的页面,然后让脚本在后台自动处理所有工作! | |
// @author SLAPaper | |
// @include /^https?://my\.qidian\.com/level/ | |
// @license MIT | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function clicker() { | |
let expList = document.getElementsByClassName("elGetExp"); | |
if (expList.length > 0) { | |
expList[0].click(); | |
} | |
} | |
function refresher() { | |
window.location.reload(true); | |
} | |
window.addEventListener("load", clicker); | |
setInterval(clicker, 60*1000); | |
setInterval(refresher, 30*60*1000); // handle cross day or browser sleep | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment