commit a18d6306ad14a76ab94403faeffef23e08c29318 Author: Abhorrent_Anger Date: Sun Sep 21 10:52:44 2025 +0300 Initial commit diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7a3094a --- /dev/null +++ b/LICENSE @@ -0,0 +1,11 @@ +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE +Version 2, December 2004 + +Copyright (C) 2004 Sam Hocevar + +Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. + +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/MyDropFreeCaseClaimer.user.js b/MyDropFreeCaseClaimer.user.js new file mode 100644 index 0000000..b5d4039 --- /dev/null +++ b/MyDropFreeCaseClaimer.user.js @@ -0,0 +1,53 @@ +// ==UserScript== +// @name My Drop Free Case Claimer +// @namespace https://pube.tk +// @version 2025-09-20 +// @description Claims free cases +// @author Abhorrent_Anger +// @match https://mydrop.pro/free* +// @icon https://www.google.com/s2/favicons?sz=64&domain=mydrop.pro +// @grant none +// @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 = 60 * 1000; +const RELOAD_TIMER = 30 * 60 * 1000; +const MAIN_WINDOW_SELECTOR = ".case-page"; +const FREE_CASE_BUTTON = '.js-free-case-participate'; +const HOUR_SELECTOR = '.js-countdown-hours'; +const MINUTE_SELECTOR = '.js-countdown-minutes'; + +function clickFreeCase() { + $(FREE_CASE_BUTTON).click(); +} + +function runRoutines() { + console.log('Checking for free coin claims...'); + clickFreeCase(); + setTimeout(runRoutines, RECHECK_TIMER); +} + +function setupReload() { + let reload_timer = Math.max(RELOAD_TIMER, getCooldown()); + console.log('Sleeping for '+reload_timer+' seconds...'); + setTimeout(reload, reload_timer); +} + +function getCooldown() { + let time = 0; + time += $(HOUR_SELECTOR).text() * 60 * 60 * 1000; + time += ($(MINUTE_SELECTOR).text() * 60 * 1000) + 60 * 1000; + return time; +} + +function reload() { + console.log('Reloading...'); + location.reload(); +} + +waitForKeyElements(MAIN_WINDOW_SELECTOR, () => { + setTimeout(runRoutines, INITIAL_TIMER); + setTimeout(setupReload, RECHECK_TIMER); +}); \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..d46cff5 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# MyDropFreeCaseClaimer + +Userscript for claiming free cases. + +## 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 [`MyDropFreeCaseClaimer.user.js`](MyDropFreeCaseClaimer.user.js). +3. Confirm that you want to install the script. +4. The script should now be installed and ready to use. Open the [FREE CASE](https://mydrop.pro/free) page. \ No newline at end of file