Skip to content

Instantly share code, notes, and snippets.

@madzak
Created July 12, 2013 16:41
Show Gist options
  • Save madzak/5985876 to your computer and use it in GitHub Desktop.
Save madzak/5985876 to your computer and use it in GitHub Desktop.
Super Mario Brothers 3 Game Hack (http://callmehiphop.github.io/mario-cards/index.html).
var cards = document.querySelectorAll("section.game div.bottom"),
matches = {};
for(var i=0;i<cards.length;i++) {
var item = cards[i].className.split(" ")[1];
if(matches[item]) {
matches[item].click();
cards[i].click();
delete matches[item];
} else {
matches[item] = cards[i];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment