-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwitch-auto-claim-bonus.user.js
35 lines (31 loc) · 1.6 KB
/
twitch-auto-claim-bonus.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// ==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
// @downloadURL https://raw.githubusercontent.com/0xShutdown/Twitch-Auto-Claim-Bonus/master/twitch-auto-claim-bonus.user.js
// @updateURL https://raw.githubusercontent.com/0xShutdown/Twitch-Auto-Claim-Bonus/master/twitch-auto-claim-bonus.user.js
// @grant none
// ==/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");