35 lines
1.3 KiB
JavaScript
35 lines
1.3 KiB
JavaScript
// ==UserScript==
|
|
// @name Skinrave Rakeback Collector
|
|
// @namespace http://tampermonkey.net/
|
|
// @version 2025-03-11
|
|
// @description Claims rakebacks
|
|
// @author Abhorrent_Anger
|
|
// @match https://skinrave.gg/en/rewards
|
|
// @icon https://www.google.com/s2/favicons?sz=64&domain=skinrave.gg
|
|
// @grant none
|
|
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
|
|
// @require https://cdn.jsdelivr.net/gh/CoeJoder/waitForKeyElements.js@v1.3/waitForKeyElements.js
|
|
// @run-at document-end
|
|
// ==/UserScript==
|
|
|
|
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 EMPTY_CLAIM = 'Claim 0.00 T';
|
|
|
|
function runRoutines() {
|
|
$(CLAIM_SELECTOR).each(function () {
|
|
if ($(this).text() == EMPTY_CLAIM) {
|
|
console.log('Skipped an empty rakeback');
|
|
return;
|
|
}
|
|
$(this).click();
|
|
console.log('Attempted to claim a rakeback');
|
|
});
|
|
setTimeout(runRoutines, RECHECK_TIMER);
|
|
}
|
|
|
|
waitForKeyElements(MAIN_WINDOW_SELECTOR, () => {
|
|
setTimeout(runRoutines, INITIAL_TIMER);
|
|
}); |