Skip to content

Instantly share code, notes, and snippets.

@sebnitu
Last active March 21, 2023 20:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebnitu/63e1464b7d8a452e05b4645bfaf17b59 to your computer and use it in GitHub Desktop.
Save sebnitu/63e1464b7d8a452e05b4645bfaf17b59 to your computer and use it in GitHub Desktop.
Run script on MWO loot bag events page to auto click buttons.
/**
* How it works:
* 1) Go to the lootbag page in MWO
* 2) Open the dev tools and paste the following code into the console
* 3) Run the script and enjoy the loot!
*/
console.log('👀 Searching for loot buttons...');
let intID = setInterval(() => {
const btn = document.querySelector('.reachButton');
if (btn) {
console.log('✅ Found one! <CLICK>');
btn.click();
} else {
console.log('👍 No more buttons');
clearInterval(intID);
}
}, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment