Skip to content

Instantly share code, notes, and snippets.

@elwinschmitz
Created August 17, 2015 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elwinschmitz/991d2b20e4b684e3112d to your computer and use it in GitHub Desktop.
Save elwinschmitz/991d2b20e4b684e3112d to your computer and use it in GitHub Desktop.
(function(){
var flag = "debug",
params = document.location.search.substr(1).split("&");
if (params.indexOf(flag) !== -1) {
params.splice(params.indexOf(flag), 1);
} else {
params.push(flag);
}
query = params.join("&");
query = query.replace(/^&/, "");
document.location.search = query;
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment