Initial commit
This commit is contained in:
parent
f398e70788
commit
c13989ac84
56
EasySkinsCoinClaimer.user.js
Normal file
56
EasySkinsCoinClaimer.user.js
Normal file
@ -0,0 +1,56 @@
|
||||
// ==UserScript==
|
||||
// @name Easy Skins Coin Claimer
|
||||
// @namespace https://pube.tk
|
||||
// @version 2025-08-08
|
||||
// @description Claims free coins on the info page
|
||||
// @author Abhorrent_Anger
|
||||
// @match https://easyskins.com/info/*
|
||||
// @icon https://www.google.com/s2/favicons?sz=64&domain=easyskins.com
|
||||
// @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 INITIAL_TIMER = 2000;
|
||||
const RECHECK_TIMER = 1000;
|
||||
const RELOAD_TIMER = 30 * 60 * 1000;
|
||||
const MAIN_WINDOW_SELECTOR = ".content";
|
||||
const REWARD_SIDEBAR_BUTTON_SELECTOR = '.menu-item__icon.free-coins';
|
||||
const REWARD_MODAL_SELECTOR = '.free-coins-modal';
|
||||
const FREE_COINS_BUTTON_ENABLED = 'button.button-get-daily-bonus:not(:disabled)';
|
||||
const FREE_COINS_BUTTON = 'button.button-get-daily-bonus';
|
||||
|
||||
function checkFreeCoins() {
|
||||
$(REWARD_SIDEBAR_BUTTON_SELECTOR).click();
|
||||
$(FREE_COINS_BUTTON).click();
|
||||
}
|
||||
|
||||
function getCooldown() {
|
||||
let time = 0;
|
||||
time += $(FREE_COINS_BUTTON + ' .seconds').text() * 1000;
|
||||
time += $(FREE_COINS_BUTTON + ' .minutes').text() * 60 * 1000;
|
||||
time += $(FREE_COINS_BUTTON + ' .hours').text() * 60 * 60 * 1000;
|
||||
return time;
|
||||
}
|
||||
|
||||
function runRoutines() {
|
||||
console.log('Checking for free coin claims');
|
||||
checkFreeCoins();
|
||||
setTimeout(recheck, RECHECK_TIMER);
|
||||
}
|
||||
|
||||
function recheck() {
|
||||
let reload_timer = Math.max(RELOAD_TIMER, getCooldown());
|
||||
console.log('Sleeping for '+reload_timer+' seconds...');
|
||||
setTimeout(reload, reload_timer);
|
||||
}
|
||||
|
||||
function reload() {
|
||||
console.log('Reloading...');
|
||||
location.reload();
|
||||
}
|
||||
|
||||
waitForKeyElements(MAIN_WINDOW_SELECTOR, () => {
|
||||
setTimeout(runRoutines, INITIAL_TIMER);
|
||||
});
|
12
README.md
12
README.md
@ -1,3 +1,13 @@
|
||||
# EasySkinsCoinClaimer
|
||||
|
||||
Userscript for claiming free coins on the info page
|
||||
Userscript for claiming free coins on the info page.
|
||||
|
||||
## Requirements
|
||||
* [Violentmonkey](https://chromewebstore.google.com/detail/violentmonkey/jinjaccalgkegednnccohejagnlnfdag) (Chrome)
|
||||
* [Violentmonkey](https://addons.mozilla.org/en-US/firefox/addon/violentmonkey/) (Firefox)
|
||||
|
||||
## Installation
|
||||
1. Ensure that you have Violentmonkey or other userscript extension installed.
|
||||
2. Download the script [`EasySkinsCoinClaimer.user.js`](EasySkinsCoinClaimer.user.js?raw=true).
|
||||
3. Confirm that you want to install the script.
|
||||
4. The script should now be installed and ready to use. Open the [INFO](https://easyskins.com/info/) page.
|
Loading…
x
Reference in New Issue
Block a user