Created
December 11, 2015 21:53
-
-
Save killa-kyle/365dc6e39b3da885bf28 to your computer and use it in GitHub Desktop.
Query String
This file contains 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 vars = [], hash; | |
var q = document.URL.split('?')[1]; | |
if(q != undefined){ | |
q = q.split('&'); | |
for(var i = 0; i < q.length; i++){ | |
hash = q[i].split('='); | |
vars.push(hash[1]); | |
vars[hash[0]] = hash[1]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment