Twitch AutoCollect Points

Collect points automagically when watching streams at Twitch

目前為 2020-11-24 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Twitch AutoCollect Points
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  Collect points automagically when watching streams at Twitch
// @author       Lasse Brustad
// @include      /^https?://(www.)?twitch.tv/\w+/
// @grant        none
// ==/UserScript==

(function() {

    'use strict';

    // Run an interval every x ms
    setInterval(function() {
        // Attempt to get the button
        var btn = document.querySelector('[data-test-selector="community-points-summary"] .claimable-bonus__icon.tw-flex');
        // Make sure to ignore errors by not doing anything
        try {
            // Click on the button, ignore if it's not there (it turns into an ignored error)
            btn.click();
        } catch (e) {
            // Ignore the error, or add something if you want
        }
    }, 1e3); // This will run every 1 sec (or actually about 1000 ms)
})();

QingJ © 2025

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