Created
May 27, 2011 23:17
-
-
Save tlrobinson/996381 to your computer and use it in GitHub Desktop.
Hack to make NewTwitter use HTML5 pushState instead of annoying hash fragments.
This file contains 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
twttr.secrets.html5Routing = true; | |
twttr.router._changeUrlAndCallAction = function(p) { | |
return twttr.Router.prototype._changeUrlAndCallAction.call(this, p.replace("#!/", "")); | |
} | |
twttr.router._changeUrlAndCallAction(window.location.hash); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To try it out just load up a Twitter page and copy the code into the JavaScript console.
This could be put in a browser extension / user script. It should be run after all of the Twitter JavaScript has been initialized.
It hasn't been tested much but seems to work.