Selector fix
This commit is contained in:
parent
78318dc87b
commit
3ddf4630d1
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Skinrave Rakeback Collector
|
// @name Skinrave Rakeback Collector
|
||||||
// @namespace https://pube.tk
|
// @namespace https://pube.tk
|
||||||
// @version 2025-03-11
|
// @version 2025-06-03
|
||||||
// @description Claims rakebacks
|
// @description Claims rakebacks
|
||||||
// @author Abhorrent_Anger
|
// @author Abhorrent_Anger
|
||||||
// @match https://skinrave.gg/en/rewards
|
// @match https://skinrave.gg/en/rewards
|
||||||
@ -15,16 +15,17 @@
|
|||||||
const RECHECK_TIMER = 60000;
|
const RECHECK_TIMER = 60000;
|
||||||
const INITIAL_TIMER = 2000;
|
const INITIAL_TIMER = 2000;
|
||||||
const MAIN_WINDOW_SELECTOR = "div.flex.overflow-y-auto.overflow-x-hidden";
|
const MAIN_WINDOW_SELECTOR = "div.flex.overflow-y-auto.overflow-x-hidden";
|
||||||
const CLAIM_SELECTOR = 'body > div.flex.overflow-y-auto.overflow-x-hidden div.gap-4 div.flex-wrap div.flex-col button:not(:disabled)';
|
const RAKEBACK_AMOUNT_SELECTOR = 'div[data-testid="rakeback-amount"]';
|
||||||
const EMPTY_CLAIM = 'Claim 0.00 T';
|
const EMPTY_CLAIM = 'Claim 0.00 T';
|
||||||
|
|
||||||
function runRoutines() {
|
function runRoutines() {
|
||||||
$(CLAIM_SELECTOR).each(function () {
|
$(RAKEBACK_AMOUNT_SELECTOR).each(function () {
|
||||||
if ($(this).text() == EMPTY_CLAIM) {
|
let button = $(this).parent().children('button').eq(0);
|
||||||
|
if (button.text() == EMPTY_CLAIM) {
|
||||||
console.log('Skipped an empty rakeback');
|
console.log('Skipped an empty rakeback');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$(this).click();
|
button.click();
|
||||||
console.log('Attempted to claim a rakeback');
|
console.log('Attempted to claim a rakeback');
|
||||||
});
|
});
|
||||||
setTimeout(runRoutines, RECHECK_TIMER);
|
setTimeout(runRoutines, RECHECK_TIMER);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user