Skip to content

Instantly share code, notes, and snippets.

@robozevel
Created August 17, 2014 14:20
Show Gist options
  • Select an option

  • Save robozevel/2583648ea5213742d649 to your computer and use it in GitHub Desktop.

Select an option

Save robozevel/2583648ea5213742d649 to your computer and use it in GitHub Desktop.
location.search.substr(1).split("&").reduce(function(o, pair) {
pair = pair.split("=");
o[pair[0]] = pair[1] && decodeURIComponent(pair[1]);
return o;
}, {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment