CClive draw_lottery

try to take over the world!

目前为 2019-01-09 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name CClive draw_lottery
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author Ayou
  7. // @match http://cc.163.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. var isDraw = false;
  14. setInterval(() => {
  15. var time = document.getElementsByClassName("lottery-red js-lottery-cd")[0];
  16. if(time !== undefined){
  17. //console.log("Time: "+time.innerText);
  18. if(isDraw === false && equals(time.innerText,"")){
  19. document.getElementsByClassName("lottery-entrance-mask js-lottery-entrance-mask js-need-log-now")[0].click();
  20. document.getElementsByClassName("lottery-footer js-lottery-footer")[0].getElementsByTagName("a")[0].click();
  21. isDraw = true;
  22. console.log("draw lottery!"+isDraw);
  23. setTimeout(() => {
  24. isDraw = false;
  25. console.log("Draw: "+isDraw);
  26. document.getElementsByClassName("lottery-close-btn win_shut")[0].click();
  27. }, 12000);
  28. }
  29. }
  30. }, 1100);
  31. })();
  32.  
  33. function equals(str1, str2)
  34. {
  35. if(str1 == str2)
  36. {
  37. return true;
  38. }
  39. return false;
  40. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址