Twitch Auto Claim Bonus

Automatically claim Twitch channel points.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name          Twitch Auto Claim Bonus
// @icon          https://raw.githubusercontent.com/0xShutdown/Twitch-Auto-Claim-Bonus/main/icon.png
// @description   Automatically claim Twitch channel points.
// @author        SHUTDOWN
// @copyright     2024, SHUTDOWN
// @version       1.1
// @license       MIT
// @match         https://www.twitch.tv/*
// @match         https://dashboard.twitch.tv/*
// @homepage      https://github.com/0xShutdown/Twitch-Auto-Claim-Bonus
// @supportURL    https://github.com/0xShutdown/Twitch-Auto-Claim-Bonus/issues
// @grant         none
// @namespace https://greasyfork.org/users/770660
// ==/UserScript==

// Function to claim Twitch channel points
function claimTwitchPoints() {
  // Select all elements with the class '.community-points-summary button'
  var pointsButtons = document.querySelectorAll(".community-points-summary button");

  // Check if there are more than one button available
  if (pointsButtons.length > 1) {
    console.log('+50 Points');
    // Click the second button (index 1) to claim points
    pointsButtons[1].click();
  }
}

// Set interval to run the claimTwitchPoints function at random intervals between 7200 and 9000 milliseconds
let chestInterval = setInterval(claimTwitchPoints, Math.random() * 1800 + 7200);

// Log a message indicating that the script is enabled
console.log("[ENABLE] Twitch Auto Claim Bonus");