Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save secretpray/dad52bcc2e52cc40e6b371d215f6ac15 to your computer and use it in GitHub Desktop.
Save secretpray/dad52bcc2e52cc40e6b371d215f6ac15 to your computer and use it in GitHub Desktop.
var fragmentQueryParameters = {};
window.location.hash.slice(1).replace(
new RegExp("([^?=&]+)(=([^&]*))?", "g"),
function($0, $1, $2, $3) { fragmentQueryParameters[$1] = $3; }
);
// Access fragment query parameters in fragmentQueryParameters object, e.g. fragmentQueryParameters.access_token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment