major update/remote host the JS and user loader

This commit is contained in:
2026-04-26 12:15:06 +03:00
parent ab1ba5c0ab
commit 037a84d6bb
9 changed files with 1106 additions and 0 deletions

21
bot_modules/00_config.js Normal file
View File

@@ -0,0 +1,21 @@
const uw = typeof unsafeWindow !== 'undefined' ? unsafeWindow : window;
const BASE_URL = 'https://grepo.haunter-pets.top';
// ---- Jitter helpers -----------------------------------------------
// Returns a random integer between min and max (inclusive)
function randInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
// Schedules fn to run after a random ms delay, then reschedules itself
function jitterLoop(fn, minMs, maxMs) {
function schedule() {
setTimeout(async () => {
await fn();
schedule(); // reschedule with a NEW random delay every time
}, randInt(minMs, maxMs));
}
schedule();
}
// ----------------------------------------------------------------