Skip to content

Instantly share code, notes, and snippets.

@liamness
Last active August 29, 2015 14:07
Show Gist options
  • Save liamness/0f82e9bb48a2053fb745 to your computer and use it in GitHub Desktop.
Save liamness/0f82e9bb48a2053fb745 to your computer and use it in GitHub Desktop.
Pops everything from the url parameters into an object
var params = {};
location.search.substring(1).split('&').forEach(function(param) {
var keyValue = param.split('=');
if(keyValue.length === 2 && keyValue.indexOf('') === -1) {
params[keyValue[0]] = keyValue[1];
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment