Live data from Hacker News

Turn your browser into a notepad with one line

coderwall.com

181–186 of 186 posts

Re: Turn your browser into a notepad with one line

#182

It's about 10 years since I did any software development, and I only bother with surface tracking of web-languages progress. So a lot of this is news to me. Also maybe some of the posted 'improved versions' provide what I'd like with this 'contenteditable' thing. It'll take a while to try them all. Anyway... So far I don't see one crucial feature: the ability to load an existing file, and edit it. Am I stupidly missi…

The File API is still kind of poorly supported, but you could add that depending on your browser (though you'd want to use an extension, since it'd be a bit more code).

As for live-editing HTML, that's usually been considered out of scope for a web browser, and been pushed to authoring or debugging programs. Chrome ships with their developer console integrated, but IIRC Firefox still relies on extensions.

Re: Turn your browser into a notepad with one line

#183
post #10

Nifty trick. To build on this, if you use chrome, add it as a search engine with a special keyword so you can type in your URL bar something like "note + + " then you're in typing mode.

Yeah this is nifty. For the lazy: Name: note Keyword: note URL: data:text/html, %s Of course, you could change the style of the URL. That's just what I defaulted to.

hi, here is my final version i use

  name: note
  keyword: n

  URL: data:text/html, function placeCaretAtEnd(el) { el.focus(); if (typeof window.getSelection != "undefined" && typeof document.createRange != "undefined") { var range = document.createRange(); range.selectNodeContents(el); range.collapse(false); var sel = window.getSelection(); sel.removeAllRanges(); sel.addRange(range); } else if (typeof document.body.createTextRange != "undefined") { var textRange = document.body.createTextRange(); textRange.moveToElementText(el); textRange.collapse(false); textRange.select(); } } html{background-color:#CCCCCC;font-family: Monaco, Consolas, "Lucida Console", monospace;font-size:14px;color:#424242;line-height:1.4;max-width:60rem;margin:0 auto;}body{background-color:#F0F1F1;padding:100px;}we%20did%20this 
it uses the "paper" look and feed and sets the focus to the end of the document so that you can just continue writing

Re: Turn your browser into a notepad with one line

#184
post #182

It's about 10 years since I did any software development, and I only bother with surface tracking of web-languages progress. So a lot of this is news to me. Also maybe some of the posted 'improved versions' provide what I'd like with this 'contenteditable' thing. It'll take a while to try them all. Anyway... So far I don't see one crucial feature: the ability to load an existing file, and edit it. Am I stupidly missi…

The File API is still kind of poorly supported, but you could add that depending on your browser (though you'd want to use an extension, since it'd be a bit more code). As for live-editing HTML, that's usually been considered out of scope for a web browser, and been pushed to authoring or debugging programs. Chrome ships with their developer console integrated, but IIRC Firefox still relies on extensions.

Firefox now comes with a console, DOM inspector and JavaScript debugger out of the box.

Re: Turn your browser into a notepad with one line

#185
post #151

Earlier quoted context omitted.

The analysis that 750 words does is very unique and interesting. You don't have to connect it with Facebook or your real name. You may create an anonymous account. Personal computer are very prone to failure. You will have to save your information somewhere on the cloud. They all shady. It is a compromise that you have to make based on your best judgement.

Look, I wouldn't enter personal data anywhere on the internet. If I write 750 words a day, I write about personal things that could be clearly related to me (by name or by my company name). I can't take that risk. Not because the guy behind 750words is not trustable. I don't know him. But because I have no idea whether or not his webserver is secure enough, whether or not he stores his FTP password somewhere in plain…

I see your problem and I agree with you. I think it's a complex issue. I am afraid of not backing up. My hard drive or local server might fail and I would like to keep a copy local and a copy offsite. All offsite vendors are somewhat shady. At the end of the day, if you use computers connected to Internet, you make yourself vulnerable of serious attacks. It is far from providing your data yourself but point is security in a relative term. So, it comes down to how sensitive is your data and how much you valve it.

Re: Turn your browser into a notepad with one line

#186

Earlier quoted context omitted.

Not in zsh it doesn't. (tip: it's a zsh thing.)

oh, well, unspecified shell snippets are usually assumed to be some bourne derivative, in which case the cat is necessary.

My bad.
Post reply on HN