Skip to content

Instantly share code, notes, and snippets.

@rpearce
Created July 31, 2013 15:56
Show Gist options
  • Save rpearce/6123303 to your computer and use it in GitHub Desktop.
Save rpearce/6123303 to your computer and use it in GitHub Desktop.
jQuery fix for annoying #_=_ returned from Facebook Oauth
$(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