Skip to content

Instantly share code, notes, and snippets.

@tallpeak
Last active January 29, 2024 21:16
Show Gist options
  • Save tallpeak/c931d4e8d50ce817ea81a47c895235c1 to your computer and use it in GitHub Desktop.
Save tallpeak/c931d4e8d50ce817ea81a47c895235c1 to your computer and use it in GitHub Desktop.
paste into Javascript console when you want dynamically-generated HTML source of the page (if view source shows very little)
addEventListener("focus", (event) =>
navigator.clipboard.writeText(document.body.innerHTML)
.then(()=>console.log("string copied to clipboard")) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment