Skip to content

Instantly share code, notes, and snippets.

@czombos
Last active September 24, 2023 11:49
Show Gist options
  • Save czombos/ac42194448625946c5e07737100405a7 to your computer and use it in GitHub Desktop.
Save czombos/ac42194448625946c5e07737100405a7 to your computer and use it in GitHub Desktop.
keydrop free case batte
// 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