Last active
December 11, 2015 16:29
-
-
Save bruno-c/4628167 to your computer and use it in GitHub Desktop.
Query string as hash.
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 qshash(){ | |
return location.search.replace('?', '').split("&") | |
.reduce(function(h, kv){ var v = kv.split('='); h[v[0]] = v[1]; return h; }, {}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment