theme selector

light blue screenshot grey screenshot navy screenshot dark green screenshot red and black screenshot
 

by Tony Chang
tony@ponderer.org

All opinions on this site are my own and do not represent those of my employer.

Creative Commons Attribution License

gm + webnote

Apr 14, 2005, 12:58am EDT

 

 

I said I was going to do it. I turned webnote into a Greasemonkey script. With the webnote gm user script, you can add notes to any web page. If you save the notes, they’ll be there the next time you browse to the page. They can also be viewed by anyone.

To create a new note, press alt+n. To save all notes, press alt+s. As of revision 1.11, saving happens automatically.

This is very, very early. There are lots of usability problems (knowing what pages have notes, remembering to save), collaboration problems (overwriting notes, keeping track of changes), and scale problems (hits my server for every page you load). But you know what they say: release early, release often.

This took an hour or so over the past few nights to complete. About an hour getting the webnote code running in Greasemonkey, an hour copying/modifying the existing webnote backend, then a couple hours adding saving/loading with the new backend. Ah, the magic of closures.

Note about privacy: The script sends a request to a central server that checks for notes on that page. That is, I can see all pages you visit, although they’re just associated with an IP address. If you want to avoid doing that for certain sites, add it to the greasemonkey exclude list. TODO: use a hash of the url and try to remove/spoof the referer header. Fixed, please upgrade.

Update 2: I’m an idiot. Permalink to the entry fixed.

Update 3: Current version and notes can be found on this page.

Jeremy Dunck at Apr 15, 2005, 05:54pm EDT

OK, I did some testing with dump, and it seems that the keydown event is never getting the combination of ctrl+alt+n. I seem to be getting a separate event per key (including ctrl and alt), but when I hit N, the other flags are false.

Added in document.addEventListener(‘keydown’…: dump(‘kp alt: ‘ + ev.altKey + ‘, ctrl: ‘ + ev.ctrlKey + ‘ key: ‘ + ev.keyCode + ‘ ’);

and the results:

kp alt: false, ctrl: true //when I pressed Ctrl key: 17 kp alt: false, ctrl: false //when I pressed Alt key: 18 kp alt: false, ctrl: false //when I pressed N key: 78 Which is a bit surprising…

allowed HTML: a, blockquote, ul, ol, li, dl, dt, dd, b, i, strong, em, code, abbr, acronym, sub, sup, span, pre

allowed HTML: a, blockquote, ul, ol, li, dl, dt, dd, b, i, strong, em, code, abbr, acronym, sub, sup, span, pre