Created
July 12, 2013 16:41
-
-
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).
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
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