您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
try to take over the world!
当前为
// ==UserScript== // @name CClive draw_lottery // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author Ayou // @match http://cc.163.com/* // @grant none // ==/UserScript== (function() { 'use strict'; var isDraw = false; setInterval(() => { var time = document.getElementsByClassName("lottery-red js-lottery-cd")[0]; if(time !== undefined){ //console.log("Time: "+time.innerText); if(isDraw === false && equals(time.innerText,"")){ document.getElementsByClassName("lottery-entrance-mask js-lottery-entrance-mask js-need-log-now")[0].click(); document.getElementsByClassName("lottery-footer js-lottery-footer")[0].getElementsByTagName("a")[0].click(); isDraw = true; console.log("draw lottery!"+isDraw); setTimeout(() => { isDraw = false; console.log("Draw: "+isDraw); document.getElementsByClassName("lottery-close-btn win_shut")[0].click(); }, 12000); } } }, 1100); })(); function equals(str1, str2) { if(str1 == str2) { return true; } return false; }