twitch自動點擊獎勵

自動點擊50獎勵

ของเมื่อวันที่ 28-03-2020 ดู เวอร์ชันล่าสุด

  1. // ==UserScript==
  2. // @name twitch自動點擊獎勵
  3. // @namespace http://tampermonkey.net/
  4. // @version 2.1
  5. // @description 自動點擊50獎勵
  6. // @author 聖冰如焰
  7. // @match https://www.twitch.tv/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. let style = document.createElement("style");
  12. style.textContent = `
  13. .self{
  14. padding : 0 10px 0 10px;
  15. align-items: center!important;
  16. position: relative;
  17. }
  18. .self:hover{
  19. background-color: rgba(0,0,0,.05);
  20. }
  21. .self::before{
  22. content: '';
  23. }
  24. .self:hover::before{
  25. content: '自動領取獎勵數';
  26. user-select: none;
  27. background-color: #040109;
  28. border-radius: 4px;
  29. color: #fff;
  30. font-size: 1.2rem;
  31. font-weight: 600;
  32. right: 0;
  33. line-height: 1.2;
  34. padding: 3px 6px;
  35. padding-top: 3px;
  36. padding-right: 6px;
  37. padding-bottom: 3px;
  38. padding-left: 6px;
  39. pointer-events: none;
  40. position: absolute;
  41. text-align: left;
  42. user-select: none;
  43. white-space: nowrap;
  44. z-index: 2000;
  45. top: 50%;
  46. transform: translate(110%,-50%);
  47. }
  48. `;
  49. document.head.append(style);
  50. let button = document.createElement("button");
  51. button.className = "self";
  52. let get_coin = 0;
  53. let time = setInterval(function(){
  54. if (document.getElementsByClassName("tw-flex tw-flex-row").length == 3){
  55. button.textContent = get_coin;
  56. document.getElementsByClassName("tw-flex tw-flex-row")[1].after(button);
  57.  
  58. clearInterval(time);
  59. }
  60. },50)
  61. setInterval(function(){
  62. if(document.getElementsByClassName("tw-button tw-button--success tw-interactive")[0] != undefined){
  63. document.getElementsByClassName("tw-button tw-button--success tw-interactive")[0].click();
  64. get_coin += 50;
  65. button.textContent = get_coin;
  66. }
  67. },1000)