Skip to content

Instantly share code, notes, and snippets.

@lnaia
Created August 15, 2014 09:13
Show Gist options
  • Save lnaia/a386fdab06894560800d to your computer and use it in GitHub Desktop.
Save lnaia/a386fdab06894560800d to your computer and use it in GitHub Desktop.
re order log text on browser
var text = document.body.textContent.split("\n")
text.pop();
text = text.reverse().join("\n");
var pre = document.createElement('pre');
pre.style.wordWrap = "break-word";
pre.style.whiteSpace = "pre-wrap";
pre.innerHTML = text;
document.body.innerHTML = '';
document.body.appendChild(pre)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment