Skip to content

Instantly share code, notes, and snippets.

@brianswisher
Created January 9, 2016 00:02
Show Gist options
  • Save brianswisher/01e841ac0103d6f56fc3 to your computer and use it in GitHub Desktop.
Save brianswisher/01e841ac0103d6f56fc3 to your computer and use it in GitHub Desktop.
Override Body JavaScript
function(_){
!function reset(){
function resetTarget(target){
target.removeAttribute("id");
target.removeAttribute("class");
target.removeAttribute("style");
target.innerHTML = `<div id="${_.id}">${_.init || ""}</div>`;
}
resetTarget(_.doc["head"]);
resetTarget(_.doc["body"]);
}()
}({
id: "App",
doc: document,
init: "loading..."
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment