您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
腾讯课堂的自动签到,会在1-3秒内,自动签到
当前为
// ==UserScript== // @name 腾讯课堂自动签到 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 腾讯课堂的自动签到,会在1-3秒内,自动签到 // @author xiyu // @match https://ke.qq.com/webcourse/* // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... function getRandomIntInclusive(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min + 1)) + min; //含最大值,含最小值 } function main() { var observer = new MutationObserver(function (mutations, observer) { mutations.forEach(mutationRecord => { mutationRecord.addedNodes.forEach(item => { // console.debug(mutationRecord); // console.debug(item); let button = item.querySelector("div.sign-dialog > div.im-dialog-wrap > div > div.btn-group > span") if(button) { setTimeout(()=> { button.click() console.log("自动签到成功", new Date()) setTimeout(()=> { button.click()}, 700); }, getRandomIntInclusive(1000, 3000)) } }) }) }); observer.observe(document.querySelector("#react-body"), { 'childList': true, }) console.log("自动签到运行中"); } main(); })();