Skip to content

Instantly share code, notes, and snippets.

@bazilio91
Last active December 11, 2015 23:18
Show Gist options
  • Save bazilio91/4675378 to your computer and use it in GitHub Desktop.
Save bazilio91/4675378 to your computer and use it in GitHub Desktop.
edit this page bookmark
javascript:(function(){
var text = document.documentElement.outerHTML;
var id = 'letsRockAndPiuPiuPiu';
var script = document.createElement('script');
script.src='//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js';
document.body.appendChild(script);
script.onload = function(){
document.body.removeChild(document.body.lastChild);
document.body.style.overflow = 'hidden';
var ed = document.createElement("div");
ed.style.position = "fixed";
ed.style.width = "100%";
ed.style.height = "100%";
ed.style.top = 0;
ed.style.left = 0;
ed.style.zIndex = 64000;
ed.style.textAlign = 'left';
ed.id = id;
document.body.appendChild(ed);
var e=ace.edit(id);
e.getSession().setValue(text);
e.setTheme("ace/theme/twilight");
e.getSession().setMode("ace/mode/html");
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment