Created
June 22, 2012 11:28
-
-
Save stevenbey/2972204 to your computer and use it in GitHub Desktop.
Add QueryString to your JavaScript location object.
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
(function() { | |
var querystring = {}; | |
window.location.search.replace( | |
/([^?=&]+)(=([^&]*))?/g, | |
function($0, $1, $2, $3) { querystring[$1] = $3; }); | |
window.location.querystring = querystring; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment