[Greasemonkey] MagicLine

Mark Pilgrim pilgrim at gmail.com
Tue Aug 2 13:27:17 EDT 2005

So anyway, this is what I was working on just before the recent
security unpleasantness.  Consider this a preview of "Greasemonkey
Hacks".  Not all the hacks are this good; some of them are even


It tracks your browsing and collects
- page URLs
- page titles
- referrers
- Author, description, keywords from <meta> tags
- Technorati tags from rel="tag" links
- XFN links
- autodiscovered RSS/Atom feeds
- autodiscovered FOAF files

Then you can press Control + Shift + L anywhere to get the MagicLine
prompt.  Start typing, and it autocompletes based on all the data it's
collected so far.

Example: visit http://philringnalda.com/ and then type "mark" into the
MagicLine prompt.  MagicLine autocompletes my name and my home page
because it parsed them from Phil's FOAF file.  (MagicLine currently
caches FOAF files forever.)

Another example: visit http://del.icio.us/popular/ and then type part
of the title of one of the links into the MagicLine prompt.  MagicLine
autocompletes the title and URL, because all pages on del.icio.us have
autodiscoverable RSS feeds.  (MagicLine caches RSS feeds for 24

Downside: no UI for options yet.  Also, it stores everything with
GM_setValue, which stores everything in prefs.js.  Browsing gets a bit
slow after you have about 1000 saved items, and you'll need to clean
out your prefs.js file manually.  I still like it though, as an
example of how far Greasemonkey can go.  The next step (in my copious
free time) will probably be to make an extension out of it so it can
use a more scalable storage mechanism.

Oh, and it works in Deer Park. :)  Enjoy.


More information about the Greasemonkey mailing list