twitch自動點擊獎勵

自動點擊50獎勵

目前為 2020-04-02 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name twitch自動點擊獎勵
  3. // @namespace http://tampermonkey.net/
  4. // @version 2.5
  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. let bool = true;
  50. let get_coin = 0;
  51. let x = document.cookie.split(" ").map(e=>{return e.split("=")});
  52. x.forEach(e => {
  53. if (e[0] == "gift"){
  54. get_coin = parseInt(e[1].split(";")[0]);
  55. console.log("cookie:"+get_coin);
  56. bool = false;
  57. }
  58. return false;
  59. });
  60. if (bool) document.cookie = `gift=${0};`;
  61. document.head.append(style);
  62. let button = document.createElement("button");
  63. button.className = "self";
  64. let timeout = 50;
  65. (function get_coins(){
  66. timeout = 50;
  67. if (document.getElementsByClassName("tw-flex tw-flex-row").length == 3 && document.getElementsByClassName("self").length == 0){
  68. button.textContent = get_coin;
  69. document.getElementsByClassName("tw-flex tw-flex-row")[1].after(button);
  70. }
  71. if(document.getElementsByClassName("tw-button tw-button--success tw-interactive")[0] != undefined){
  72. document.getElementsByClassName("tw-button tw-button--success tw-interactive")[0].click();
  73. get_coin += 50;
  74. button.textContent = get_coin;
  75. document.cookie = `gift=${get_coin};`;
  76. timeout = 600000;
  77. console.log(new Date,get_coin);
  78. }
  79. setTimeout(get_coins,timeout)
  80. })()

QingJ © 2025

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