Skip to content

Instantly share code, notes, and snippets.

@p34eu
Created July 27, 2016 14:43
Show Gist options
  • Save p34eu/69e8e784da806b93bde18c6ba19b2d8f to your computer and use it in GitHub Desktop.
Save p34eu/69e8e784da806b93bde18c6ba19b2d8f to your computer and use it in GitHub Desktop.
var querystring=(function (s) {
if (s === "")return {};var c = {};for (var e = 0; e < s.length; ++e) {
var f = s[e].split("=");if (f.length !== 2)continue;c[f[0]] = decodeURIComponent(f[1].replace(/\+/g, " "));
}return c;
})(window.location.search.substr(1).split("&"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment