tweaking the github .js file to work with history.onpopstate