Last active
September 24, 2023 11:49
-
-
Save czombos/ac42194448625946c5e07737100405a7 to your computer and use it in GitHub Desktop.
keydrop free case batte
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://key-drop.com/case-battle/list | |
// open browser console and run this | |
const targets = ['x1']; | |
(async () => { | |
while (true) { | |
await new Promise(r => setTimeout(r, 100)); | |
try { | |
const casePrices = [...document.querySelectorAll('div.w-fit')].splice(0, 5).map(e => e.textContent); | |
const targetIndex = casePrices.findIndex(price => targets.includes(price)); | |
console.log(casePrices, targetIndex); | |
if (casePrices[targetIndex] === 'x1' && targetIndex !== -1) { | |
const btns = [...document.querySelectorAll('a.button.button-green-dimmed')]; | |
const btn = btns[targetIndex]; | |
console.log(btns, btn); | |
btn.click(); | |
} | |
} catch {null;} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment