Skip to content

Instantly share code, notes, and snippets.

@brianswisher
Created January 8, 2016 23:48
Show Gist options
  • Select an option

  • Save brianswisher/0c82165329a67cdd8cbd to your computer and use it in GitHub Desktop.

Select an option

Save brianswisher/0c82165329a67cdd8cbd to your computer and use it in GitHub Desktop.
Reset Body JavaScript
!function(_){
!function reset(){
function resetTarget(target){
target.removeAttribute("id");
target.removeAttribute("class");
target.removeAttribute("style");
target.innerHTML = "";
}
resetTarget(_.doc["head"]);
resetTarget(_.doc["body"]);
}()
}({
doc: document
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment