[The Wiki Game](http://thewikigame.com) is an online game where you attempt to navigate through wikipedia from a start page to a goal page using as few other pages as possible.
Not long after I was shown the it, I realised that I _really_ wasn't very good at it. After about 15 minutes of coming in last place all the time, I started to wonder how it worked, and how I could beat it.
The game isn't open source, so I couldn't see how the back end worked, but after playing a few games and checking what happened on the page, I worked out what it was doing.
With this, I started to write something that would change the location of the iframe to the goal. Fortunately for me, the goal URL was on the page. So all it took was a little switcheroo to win!
The source for this was written in pure JS, and relies heavily on the fact that the wiki game uses jQuery so I can plug into components and events really easily. The code can be found in the GitHub gists below. Both the standard and compact versions are available.
As I experienced whilst developing this, the people that play Wiki Game don't tend to like people cheating. There were a lot of people getting very annoyed whilst I was developing and testing. So please use this at your own risk! At the moment I don't think there is any kind of banning system, but be warned!