Skip to content

Instantly share code, notes, and snippets.

@kpuputti
Created November 4, 2011 09:19
Show Gist options
  • Save kpuputti/1338982 to your computer and use it in GitHub Desktop.
Save kpuputti/1338982 to your computer and use it in GitHub Desktop.
URL GEt params from location.hash parsing
// one liner
_.tap({}, function (o) { _.each(location.hash.split('&'), function (p) { var s = p.split('='); o[s[0]] = s[1]; }); });
// indented
_.tap({}, function (o) {
_.each(location.hash.split('&'), function (p) {
var s = p.split('=');
o[s[0]] = s[1];
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment