Twitch Auto Channel Point Claimer

Now auto claim bonus channel points when afk or watching the stream in fullscreen

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Twitch Auto Channel Point Claimer
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Now auto claim bonus channel points when afk or watching the stream in fullscreen
// @author       Sparkles-SP
// @match        https://www.twitch.tv/*
// @grant        none
// ==/UserScript==

(function() {


var first = true;
var time = 0;
var hasBeenClaimed = "script started, no claims yet!";
var x = 1
window.setInterval(function(){


    if (document.getElementsByClassName('claimable-bonus__icon tw-flex').length > 0) {
        console.clear();
        eventFire(document.getElementsByClassName('claimable-bonus__icon tw-flex')[0], 'click');
        console.log("You have claimed " + x.toString() + " times this session making a total of " + (50 * x).toString() + " claimed");
        hasBeenClaimed = "last claim, you have claimed " + x.toString() + " times this session making a total of " + (50 * x).toString() + " claimed";
        x += 1;
        time = 0;
    }
    else if (time % 10 == 0.0 && !first){
        console.clear();
        console.log(time.toString() + " seconds have passed since " + hasBeenClaimed)
    }

    time += 2;
    first = false;

    }, 2000);
})();

function eventFire(el, etype){
  if (el.fireEvent) {
    el.fireEvent('on' + etype);
  } else {
    var evObj = document.createEvent('Events');
    evObj.initEvent(etype, true, false);
    el.dispatchEvent(evObj);
  }
};