Twitch 自動點擊獎勵

自動點擊50獎勵

Från och med 2020-12-18. Se den senaste versionen.

  1. // ==UserScript==
  2. // @version 3.1.3
  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. GM_addStyle(`
  18. .self{
  19. padding : 0 10px 0 10px;
  20. align-items: center!important;
  21. position: relative;
  22. }
  23. .self:hover{
  24. background-color: rgba(0,0,0,.05);
  25. }
  26. .self::before{
  27. content: '';
  28. }
  29. .self:hover::before{
  30. content: '自動領取獎勵數';
  31. user-select: none;
  32. background-color: #040109;
  33. border-radius: 4px;
  34. color: #fff;
  35. font-size: 1.2rem;
  36. font-weight: 600;
  37. right: 0;
  38. line-height: 1.2;
  39. padding: 3px 6px;
  40. padding-top: 3px;
  41. padding-right: 6px;
  42. padding-bottom: 3px;
  43. padding-left: 6px;
  44. pointer-events: none;
  45. position: absolute;
  46. text-align: left;
  47. user-select: none;
  48. white-space: nowrap;
  49. z-index: 2000;
  50. top: 50%;
  51. transform: translate(110%,-50%);
  52. }`)
  53. window.onload = function(){
  54. let Gift = GM_getValue(location.href,0);
  55. let Time_out = 50;
  56. (function Get_coins(){
  57. Time_out = 50;
  58. if ($('button.self').length === 0) {
  59. Gift = GM_getValue(location.href,0);
  60. $('[class="tw-flex tw-flex-row"]').after(`<button class='self'>${Gift}</button>`);
  61. }
  62. if($('.tw-button.tw-button--success').length !== 0){
  63. $('.tw-button.tw-button--success').click();
  64. GM_setValue(location.href,Gift + 50);
  65. Gift = GM_getValue(location.href);
  66. $('button.self').text((Gift).toLocaleString());
  67. Time_out = 6000;
  68. console.log(new Date,Gift);
  69. }
  70. setTimeout(Get_coins,Time_out)
  71. })()
  72. }