Created
July 25, 2012 09:39
-
-
Save emilisto/3175310 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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