News for hackers. Stuff that matters.
Re:Show HN: Papier – Open a new tab and trap your best thoughts by dpflan on Tuesday March 08, 2016 @09:20AM (#11245330)
There is a clever and simple code snippet to convert a tab into a notepad:

  data:text/html, <html contenteditable>
Copy and paste into your browser address bar. Just bookmark that and you have a notepad with content that you can italicize, embolden, print, export, etc. I'm sure someone here can tweak this code to be even more feature-rich yet still compact. Or check the comments from the original web page.

This snippet was shared a while ago on HN: https://news.ycombinator.com/item?id=5135194

Re:Show HN: Papier – Open a new tab and trap your best thoughts by aagat on Tuesday March 08, 2016 @11:43AM (#11246392)
I have something similar bookmarked though I can't remember the original author. I've been using it for a while as quick note taking app and it works wonderfully. (tested on chrome)

  javascript:(function(d){d.write('<body contenteditable style="font: 2rem/1.5 monospace;max-width:60rem;margin:0 auto;padding:4rem;">');var k = 'c'; var q = d.querySelector('body');q.innerHTML=localStorage[k];q.oninput=function(){localStorage[k]=q.innerHTML;}})(document);
Re:Show HN: Papier – Open a new tab and trap your best thoughts by dksidana on Tuesday March 08, 2016 @02:03PM (#11247618)
You are missing usecase that content has to be saved and retrieved on reopening
Re:Show HN: Papier – Open a new tab and trap your best thoughts by two2two on Tuesday March 08, 2016 @10:57AM (#11246003)
This works great in Safari for Mac and iOS. Thank you very much for filling a void in my work flow.
Re:Show HN: Papier – Open a new tab and trap your best thoughts by thenomad on Tuesday March 08, 2016 @09:28AM (#11245379)
Either FF or Noscript disables that for me in Firefox. Works in Chrome though.
Re:Show HN: Papier – Open a new tab and trap your best thoughts by dpflan on Tuesday March 08, 2016 @09:34AM (#11245424)
What version of FF? On FF 44 this code works with the following warning in the console:

The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.

Re:Show HN: Papier – Open a new tab and trap your best thoughts by thenomad on Wednesday March 09, 2016 @07:51AM (#11252638)
FF44 for me too. Must be Noscript disabling it.