Live data from Hacker News

Turn your browser into a notepad with one line

coderwall.com

61–70 of 186 posts

Re: Turn your browser into a notepad with one line

#61
post #27

Very clever! I set this as the default URL for new tabs.. Now, everytime I open a new tab, I have a quick scratchpad for pasting/testing/etc.

That's a great idea, did you do it for Chrome? Seems like with Chrome it's non-trivial to set the page for new tabs...

Re: Turn your browser into a notepad with one line

#62
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…

I have a scratch.txt file that I've had around for years. Just shy of 10,000 lines now - it's full of workings and things to remember.

I keep it in textmate, been thinking about moving it to vim but I quite like having it in its own space.

Re: Turn your browser into a notepad with one line

#64
> Sometimes I just need to type garbage. Just to clear out my mind. Using editors to type such gibberish annoys me because it clutters my project workspace (I'm picky, I know).

This is a hack and a workaround. The bug is clearly using an editor restricted to editting files in a "Project Workspace". Yikes.

Everyone has their own workflow, and they're all insane (for myself, I have an emacsclient wrapper that when called without a file will create a unique name under ~/.emacsclient-scratch and edit that -- so I never lose anything I know I was typing at one point). Still... this just seems like a really bad solution. You get an "editor everywhere" but it's the default editor in your browser. Ick. It's cute though.

Re: Turn your browser into a notepad with one line

#65
I'm actually surprised this link got this much traction, I actually thought this was a thing that most developers were aware of. Shows you that you ought to reconsider when disseminating information that you as a learned developer think is "too basic" to bother writing about.

Re: Turn your browser into a notepad with one line

#67
post #48

The nicest thing about this is that you can CTRL+S save it as a .html file, and then you can also CTRL+O load the file and it's still editable, and save it again!

Really? What browser? I just tried it in Chrome and it didn't save what I'd typed.

Re: Turn your browser into a notepad with one line

#68
post #39

Earlier quoted context omitted.

I'm on mobile so I can write to much accompanying text, but start here: http://www.html5rocks.com/en/tutorials/file/filesystem/

Thanks to both of you. I'll check it out.

I don’t think that’s going to work, since the data URI is inherently local (and only works on Chrome), and you can’t use the Chrome file-system API or even localStorage when you're viewing a local file, unless chrome was opened with `--allow-file-access-from-files`

Re: Turn your browser into a notepad with one line

#70
After some mix-and-matching of the awesome code snippets posted in the comments, I came up with something easy on the eyes (with a nice little color transition (for webkit-enabled browsers):

data:text/html, http://fonts.googleapis.com/css?family=Lato:100,200,300,400,... rel='stylesheet' type='text/css'> html { font-family: "Lato"; color:#e9e9e9; background-color:#222; } * { -webkit-transition: all linear 1s; }

Post reply on HN