Skip to content

Instantly share code, notes, and snippets.

@banjeremy
Last active August 29, 2015 14:05
Show Gist options
  • Save banjeremy/469e7f59d866d0fbe0da to your computer and use it in GitHub Desktop.
Save banjeremy/469e7f59d866d0fbe0da to your computer and use it in GitHub Desktop.
Here is a useful little function to grab the query string parameters from the window.location object.
function getQueryParams() {
var params = [];
var query = window.location.search;
query = query.slice(1, query.length);
var nv = query.split('&');
for (var i = 0; i < nv.length; i++) {
var q = nv[i].split('=');
params[q[0]] = q[1];
}
return params;
}
@kaylasommer
Copy link

Can you fix this?

@banjeremy
Copy link
Author

I believe this has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment