Skip to content

Instantly share code, notes, and snippets.

@nathansmith
Last active June 2, 2020 18:24
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 nathansmith/22af671131de4777a37ff9d76c4e48b7 to your computer and use it in GitHub Desktop.
Save nathansmith/22af671131de4777a37ff9d76c4e48b7 to your computer and use it in GitHub Desktop.

Recently, I was reminiscing about the <plaintext> tag.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/plaintext

It made me think of trying this silly JS snippet experiment.

Pasting it into the dev tools console will show a "view source" of the page.

document.documentElement.innerHTML =
`<plaintext>${
document.documentElement.innerHTML
}`
.replace(/\n\s+/g, '\n');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment