Created
January 31, 2017 06:08
-
-
Save muthuspark/6d30d7114c0a879802fe5a74579e2c65 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
if (window.location.search) { | |
var qs = window.location.search.split('+').join(' '); | |
var params = {}, | |
tokens, | |
re = /[?&]?([^=]+)=([^&]*)/g; | |
while (tokens = re.exec(qs)) { | |
params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]); | |
} | |
console.log(params); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment