From 3ddf4630d1d5a00900a7226abd03d14a839b2f69 Mon Sep 17 00:00:00 2001 From: Abhorrent_Anger Date: Tue, 3 Jun 2025 10:07:58 +0300 Subject: [PATCH] Selector fix --- SkinraveRakebackCollector.user.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/SkinraveRakebackCollector.user.js b/SkinraveRakebackCollector.user.js index b332315..d572f39 100644 --- a/SkinraveRakebackCollector.user.js +++ b/SkinraveRakebackCollector.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Skinrave Rakeback Collector // @namespace https://pube.tk -// @version 2025-03-11 +// @version 2025-06-03 // @description Claims rakebacks // @author Abhorrent_Anger // @match https://skinrave.gg/en/rewards @@ -15,16 +15,17 @@ const RECHECK_TIMER = 60000; const INITIAL_TIMER = 2000; 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'; function runRoutines() { - $(CLAIM_SELECTOR).each(function () { - if ($(this).text() == EMPTY_CLAIM) { + $(RAKEBACK_AMOUNT_SELECTOR).each(function () { + let button = $(this).parent().children('button').eq(0); + if (button.text() == EMPTY_CLAIM) { console.log('Skipped an empty rakeback'); return; } - $(this).click(); + button.click(); console.log('Attempted to claim a rakeback'); }); setTimeout(runRoutines, RECHECK_TIMER);