Skip to content

Instantly share code, notes, and snippets.

@emilisto
Created July 25, 2012 09:39
Show Gist options
  • Save emilisto/3175310 to your computer and use it in GitHub Desktop.
Save emilisto/3175310 to your computer and use it in GitHub Desktop.
var parseQueryString = function(url) {
var a = document.createElement('a');
a.href = url;
str = a.search.replace(/\?/, '');
return deparam(str, true /* coerce values, eg. 'false' into false */);
};
// And in the script tags loop
var info = parseQueryString(el.src);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment