Twitch 自動點擊獎勵

自動點擊50獎勵

  1. // ==UserScript==
  2. // @version 4.0.0
  3. // @author 聖冰如焰
  4. // @description 自動點擊50獎勵
  5. // @description:en Auto get 50 reward.
  6. // @license BY-NC-SA 3.0 TW
  7. // @name Twitch 自動點擊獎勵
  8. // @name:en Twitch auto get bonus
  9. // @match https://www.twitch.tv/*
  10. // @namespace http://tampermonkey.net/
  11. // @require http://code.jquery.com/jquery-3.4.1.min.js
  12. // @grant GM_addStyle
  13. // @grant GM_getValue
  14. // @grant GM_setValue
  15. // ==/UserScript==
  16. 'user strict'
  17.  
  18. GM_addStyle(`
  19. #gift-count__button{
  20. padding : 0 15px 0 15px;
  21. display: inline-flex;
  22. position: relative;
  23. -webkit-box-align: center;
  24. align-items: center;
  25. -webkit-box-pack: center;
  26. justify-content: center;
  27. vertical-align: middle;
  28. text-decoration: none;
  29. white-space: nowrap;
  30. user-select: none;
  31. font-weight: var(--font-weight-semibold);
  32. border-radius: var(--border-radius-medium);
  33. font-size: var(--button-text-default);
  34. height: var(--button-size-default);
  35. background-color: var(--color-background-button-text-default);
  36. color: var(--color-text-alt-2);
  37. }
  38.  
  39. #gift-count__button:hover{
  40. background-color: var(--color-background-button-text-hover);
  41. }
  42.  
  43. #gift-count__button:active {
  44. background-color: var(--color-background-button-text-active);
  45. }
  46.  
  47. #gift-count__button::before{
  48. content: '';
  49. }
  50.  
  51. #gift-count__button:hover::before{
  52. content: '自動領取獎勵數';
  53. user-select: none;
  54. background-color: #040109;
  55. border-radius: 4px;
  56. color: #fff;
  57. font-size: 1.2rem;
  58. font-weight: 600;
  59. right: 0;
  60. line-height: 1.2;
  61. padding: 3px 6px;
  62. padding-top: 3px;
  63. padding-right: 6px;
  64. padding-bottom: 3px;
  65. padding-left: 6px;
  66. pointer-events: none;
  67. position: absolute;
  68. text-align: left;
  69. user-select: none;
  70. white-space: nowrap;
  71. z-index: 2000;
  72. top: 50%;
  73. transform: translate(110%,-50%);
  74. }`);
  75.  
  76. let Gift = 0;
  77. let TimeOut = 50;
  78. let Container;
  79. let GiftCountButton = $('<button id="gift-count__button">0</button>');
  80.  
  81. let ContainerCheck = () => {
  82. if (!$("#gift-count__button").length) {
  83. Gift = GM_getValue(location.href, 0);
  84. Container = $('.chat-input__buttons-container div:eq(0)');
  85. GiftCountButton.text((Gift).toLocaleString())
  86. Container.after(GiftCountButton);
  87. }
  88. requestAnimationFrame(ContainerCheck);
  89. };
  90.  
  91. window.onload = function () {
  92. requestAnimationFrame(ContainerCheck);
  93. (function Get_coins() {
  94. TimeOut = 50;
  95. let Bonus = $('.claimable-bonus__icon');
  96. if (Bonus.length !== 0) {
  97. Bonus.click();
  98. GM_setValue(location.href, Gift + 50);
  99. GiftCountButton.text((Gift += 50).toLocaleString())
  100. TimeOut = 6000;
  101. console.log(new Date, Gift);
  102. }
  103. setTimeout(Get_coins, TimeOut);
  104. })();
  105. };

QingJ © 2025

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