MonkeyForDesigner

用于中建信和学堂党课自动挂机

  1. // ==UserScript==
  2. // @name MonkeyForDesigner
  3. // @namespace MonkeyForDesigner
  4. // @match https://e-cscec.zhixueyun.com/
  5. // @grant none
  6. // @version 1.1
  7. // @author -
  8. // @description 用于中建信和学堂党课自动挂机
  9. // ==/UserScript==
  10. (function() {
  11. 'use strict';
  12. console.log("Start.");
  13. setTimeout(checkbtm, 5000);
  14. })();
  15.  
  16. function checkbtm() {
  17. var a = 1;
  18. console.log("conntinue");
  19. var next_btm = document.getElementById("D212btn-ok");
  20. var end_btm = document.getElementById("D211anewStudy");
  21.  
  22. if (next_btm) {
  23. next_btm.click();
  24. console.log("Get btm and clicked.");
  25. }
  26. if (end_btm) {
  27. if (a === 1) {
  28. alert("Done!");
  29. console.log("Done!");
  30. a--;
  31. } else {
  32. console.log("Something Wrong!");
  33. }
  34. }
  35. setTimeout(checkbtm, 1000);
  36. }