29 January 2013

One-line browser notepad bookmark

I just saw this neat trick to turn your browser into a notepad by Jose Jesus Perez Aguinaga via hacker news. It’s an elegant use of the data URI schema to create an empty, editable page in one, short line:

data:text/html, <html contenteditable>

In case you missed it… that’s a URL. So, you can just go to that as a page, even bookmark it, and it'll work like a little built-in app. Furthermore, since all of the logic is stored directly in the URL, it will work even if you’re not connected to the internet.

scratch ← click to open the one-line notepad (you have to click on the page to start writing)

However if you’re gonna take the time to bookmark something, we can extend it to include a little bit of styling and to auto-focus the cursor onto the page:

scratch+ ← a slightly prettier version, click or drag to your browser bar

I called them “scratch”, because emacs has a buffer called *scratch* for the same purpose. Also, I really like data URIs.

Interested in working with me at Superset to help shape the future of virtual fitness and to empower people to launch their own businesses online? We’re hiring a full-stack engineer. 💪🤓💻 Apply online

Did you find this helpful or fun? paypal.me/mrcoles
comments powered by Disqus

Peter Coles

Peter Coles

is a software engineer living in NYC who is building Superset 💪 and also created GoFullPage 📸
more »

github · soundcloud · @lethys · rss