Re:Turn your browser into a notepad with one line
by ernestipark on Tuesday January 29, 2013 @01:39PM
(#5135478)
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 + <ENTER> + <TAB>" then you're in typing mode.
[ Parent
| on HN ]
Re:Turn your browser into a notepad with one line
by darxius on Tuesday January 29, 2013 @01:47PM
(#5135526)
Yeah this is nifty. For the lazy:
Name: note
Keyword: note
URL: data:text/html, <textarea style="font-size: 1em; width: 100%; height: 100%; border: none; outline: none" autofocus /> %s
Of course, you could change the style of the URL. That's just what I defaulted to.
Re:Turn your browser into a notepad with one line
by franze on Thursday January 31, 2013 @03:29AM
(#5144073)
hi, here is my final version i use
name: note
keyword: n
URL: data:text/html, <html><head><script>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(); } }</script><style> 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;}</style></head><body contenteditable autofocus onload="placeCaretAtEnd(window.document.body);">we%20did%20this </body></html>
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
by pax on Tuesday January 29, 2013 @06:59PM
(#5137228)
for the really lazy, keyword: '..' ('//' doesn't work :)
Re:Turn your browser into a notepad with one line
by gpmcadam on Tuesday January 29, 2013 @02:02PM
(#5135605)
In fact, if you add the `%s` variable inside the HTML tag:
data:text/html, <html contenteditable>%s
This way, you can enter: note [tab] "foo bar baz" [enter]
And whatever you enter as the search query ends up in the note to start with.Edit: Just saw the other response to this comment saying basically the same thing. Nevermind.
Re:Turn your browser into a notepad with one line
by brunolazzaro on Tuesday January 29, 2013 @05:51PM
(#5136921)
data:text/html, <html contenteditable><h1>%s</h1>
More like it.