Skip to content

Instantly share code, notes, and snippets.

@morbidcamel101
Created December 11, 2014 19:18
Show Gist options
  • Save morbidcamel101/5e8165c35f060868761c to your computer and use it in GitHub Desktop.
Save morbidcamel101/5e8165c35f060868761c to your computer and use it in GitHub Desktop.
var qsParm = new Array();
qsParm["viewMode"] = "Default";
qsParm["forMobile"] = "false";
function parseQueryString() {
var query = window.location.search.substring(1);
var parms = query.split('&');
for (var i = 0; i < parms.length; i++) {
var pos = parms[i].indexOf('=');
if (pos > 0) {
var key = parms[i].substring(0, pos);
var val = parms[i].substring(pos + 1);
qsParm[key] = val;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment