Skip to content

Instantly share code, notes, and snippets.

@clisamurai
Last active January 13, 2016 23:00
Show Gist options
  • Save clisamurai/1abeeebfdf14b5b437e8 to your computer and use it in GitHub Desktop.
Save clisamurai/1abeeebfdf14b5b437e8 to your computer and use it in GitHub Desktop.
Welcome to Scratchpad local
data:text/html, <html> <title>Scratchpad.local</title> <style> body { font: 1.5rem/1.5 monospace; max-width: 60rem; margin: 0 auto; padding: 4rem; } @media screen and (max-width: 720px) { .hide { visibility: hidden; height: 5px; } } @media screen and (max-width: 620px) { .hide { height: 0px; } body { max-width: 100vw; padding: 0rem; margin: 10px; } } @media print { .hide { visibility: hidden; height: 0px; } body { padding: 0rem; } } </style> <body> <p class="hide"><b>Directions: </b> Press Ctrl/Cmd+S to save | Ctrl/Cmd + O to open | Ctrl/Cmd + P to print <br /> <small>You are viewing, editing or creating a document in Scratchpad.local. There is no autosave functionality. Documents save as HTML files and can be opened in any modern browser.</small> </p> <h1 contenteditable style="font: large;" id="title">Title</h1> <div contenteditable style="height: 100%">Enter content here...</div> <script type="text/javascript"> document.getElementById("title").addEventListener("input", function() { var allHOnes = document.getElementsByTagName("h1"); document.title = allHOnes[0].innerText; }, false); </script> </body> </html>
@clisamurai
Copy link
Author

Tested with Firefox and Chrome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment