Live data from Hacker News

Turn your browser into a notepad with one line

coderwall.com

161–170 of 186 posts

Re: Turn your browser into a notepad with one line

#162
post #34

This is what the scratch (EDIT: read scratch as * scratch * without the spaces--is there any way to escape that properly on HN?) buffer is for in Emacs, and I find it extremely useful. Also, unlike using a different tool, it allows me to use all the Emacs-specific features I usually rely on. (For example, I can easily type special characters like r₁ × r₂ ≈ r₃ using the TeX mode.) If you want more than one scratch buf…

[deleted]

Re: Turn your browser into a notepad with one line

#164
post #148

But... Why? I know he tried to justify it in his post, but to me, having a save option FAR outweighs the "benefit" of having your notes in a browser.

It's almost like it's completely pointless... no?

Coming soon, find out what happens when you 20 GOTO 10!!!

Re: Turn your browser into a notepad with one line

#165

It's cute, but I can't help observing that we're what, 70 years into the computer age, and there's still no ubiquitous, small, fast, clean text editor present by default on all personal computers. (DO NOT speak to me of Notepad.exe) So discovering that 'by accident' web browsers can act as a simple (but huge, bloated and feature-starved) text editor seems like a big deal. Personally I keep a simple, tiny, old freewar…

First thing I do on a new Windows machine is install Notepad2[1]. I highly recommend it, it greatly improves on Notepad.exe while keeping the spirit (simple, lightweight no bullshit editing). It can be configured to replace Notepad.exe automatically. [1]http://www.flos-freeware.ch/notepad2.html

Re: Turn your browser into a notepad with one line

#169

Ah shoot. If Chrome allowed localStorage to be accessible from file:/// then we could add save (CTRL+S) and automatic load using this: data:text/html, window.onload=function(){var a=document.body;a.innerText=localStorage.mydoc;a.addEventListener("keydown",function(b){b.ctrlKey&&83==b.which&&(localStorage.mydoc=a.innerHTML,b.preventDefault())},!1)}; Firefox will save it to localStorage but clear the local storage afte…

That is so cool :). I just slapped together a (really) simple chrome ext for opening up a new tab in "contenteditable" mode. It saves the contents into localStorage, thats it for now :) Here it is if anyones interested https://github.com/jwaterfaucett/textpad

I forked your code, added support so you can do (C-N) to open a new tab, click tab and start typing (the cursor will be at the end of the line), polished it up a bit (changed font to consolas, added a grey background with a tint of white text-shadow). I've sent a pull request.

https://github.com/AeonAxan/textpad

Re: Turn your browser into a notepad with one line

#170
Interestingly, NoScript addon for Firefox brings up the following message on attempting the URL:

"javascript: and data: URIs typed or pasted in the address bar are disabled to prevent social engineering attacks. Developers can enable them for testing purposes by toggling the "noscript.allowURLBarJS" preference."

Post reply on HN