Created
July 31, 2013 15:56
-
-
Save rpearce/6123303 to your computer and use it in GitHub Desktop.
jQuery fix for annoying #_=_ returned from Facebook Oauth
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
$(window).on('load', function(e) { | |
if (window.location.hash == '#_=_') { | |
window.location.hash = ''; // for older browsers, leaves a # behind | |
history.replaceState('', document.title, window.location.pathname); // nice and clean | |
e.preventDefault(); // no page reload | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment