Musings about technology and other neat stuff

BrT random header image tagging using browser keywords

August 7th, 2005 · 12 Comments

(see Update below!)

For a while, I have assigned a keyword to the bookmarklet. I use Sogudi in Safari for this, but the same feature exists in pretty much any other browser. With the default bookmarklet, I had assigned the keyword “dl” to it, so when viewing a web page, I can just press Command-L, type “dl”, press Enter, enter tags, press “Save”, and it saves the bookmark and takes me back to the page.

This trick by Fraser Speirs inspired me to try and improve this technique. I have now slightly modified the bookmarklet so I can enter the tags I want directly after the keyword. This is the content of the bookmark (make sure it’s all in a single line and without spaces):


The “@@@” is the special string that tells Sogudi to insert there the text typed after the keyword (for Firefox and Mozilla, use “%s” – I’m not sure for Opera). After this is saved, you can type “dl tag1 tag2 tag3″ and the tags field will be pre-filled, you can just press the “save” button.

For automatically posting the URL, without going through the form, you can use this bookmark:


Don’t forget to set your username and password in there. This has the disadvantage of showing you the XML result page instead of sending you back to the page.

I think this should also work with QuickSilver, but for now, when I define a bookmark with the special “\*\*\*” in it and use it as a search in QS, it does not send it to Safari – only if I do “Run Javascript” on it, but then I don’t get to give it the tags. Maybe I’ll keep investigating this, although I’m perfectly happy about doing this from the browser.

Final version

Update: Using this improved bookmarklet as a base, I have a new one: if you provide tags, it will automatically add the URL, but if you don’t, it will take you to the input form. It still will use the selected text, if any, as the extended description (unfortunately this does not work in Safari, as it unselects the text when you move to the location bar – bummer). Here are the bookmarklets:

In any case, you have to edit the bookmark and replace the string CHANGEME with your username. Here is the code (for the Firefox version), in case you want to cut and paste (make sure you put it all in a single line):

javascript:u='CHANGEME';t='%s';q=location.href;e = '' +
(window.getSelection ? window.getSelection() : document.getSelection ?
document.getSelection() : document.selection.createRange().text);
escape(p)+ '&extended=' + escape(e):''+u+

Thanks to John Resig for the improved code!


12 responses so far ↓

  • 1 John Resig // Aug 7, 2005 at 10:45 pm

    Super-Fast Delicious Bookmarklet

    Today I noticed that Chris Lott was looking for a super-fast way to post to after having posted a link to this bookmarklet on his link page.

    The bookmarklet provides the following functionality:

    The ability to type ‘d tag…

  • 2  Daniel Schildt // Aug 9, 2005 at 1:48 pm

    Thanks much for the improved version of improved version of your bookmarklet. ;)

    Works well and makes using much faster and easier.

  • 3  BillSaysThis // Aug 10, 2005 at 12:48 am

    Having similar problem with the improved version. When typing d tag… Firefox apparently triggers a quick search to in a new tab even though I don’t have a quicksearch bookmark or search box extension for that site (I have used it). I have Tab Mix Plus extension installed but turned off the new tab from location bar option.

  • 4 HARALD MARTIN STRÖM » Blog Archive » Fast bookmarklet // Aug 12, 2005 at 12:57 am

    [...] I took Hitchhiker’s Sogudi shortcut and modified it to use a JavaScript-prompt() to ask for the tags. Use it in Safari as the first bookmark or so and activate it by pressing cmd + 1 (or other number depend on where on the bookmark bar it is) [...]

  • 5  Hitchhiker // Aug 13, 2005 at 11:08 pm

    BillSaysThis: just to ask the obvious, have you defined the “d” keyword for the bookmarklet?

  • 6  Marco // Oct 7, 2005 at 3:30 am

    You can use the bookmarklet in AcidSearch (a very powerful add-on for your search bar), as well.

    Just delete the “@@@” from the Sogudi bookmarklet, and split the code right at the point where the first @ was (see below). Open double brackets, {{ at the beginning of the “Prefix URL” part, and close them at the end of the “Suffix URL.” Then, swap CHANGEME with your username, and select a shortcut for it.

    javascript:u=’CHANGEME’;t=’@@@’;q=location.href;[cut for brevity]encodeURIComponent(e);

    Prefix URL:
    {{u=’CHANGEME’;t=’ –don’t close brackets here!

    Suffix URL:
    ‘;q=location.href;[cut for brevity]encodeURIComponent(e);}} –close’em here!

    I hope that was clear enough… :P

  • 7 yup » Flocker and delicious+bookmarklets // Nov 5, 2005 at 12:43 am

    [...] tagging using browser keywords [...]

  • 8  Geodog // Nov 26, 2005 at 7:15 am

    This recently stopped working for me. Any idea why?

  • 9  Hitchhiker // May 7, 2006 at 10:55 pm

    Geodog – what stopped working? I just updated the bookmarklet, maybe this will fix it?

  • 10  Tom Clancy // Jun 27, 2006 at 9:30 pm

    Yeah, it just stopped working for me as of this afternoon (it was fine this morning). Whenever I try, I get:

    “A required security token was not received with your form data.” I’m guessing they’re now requiring a password?

  • 11  britta gustafson // Jul 26, 2006 at 10:18 pm

    Here’s an explanation of why this doesn’t work anymore:

  • 12 tagging using browser keywords « llbbl // May 9, 2008 at 1:50 pm

    [...] 9, 2008 tagging using browser keywords With the default bookmarklet, I had assigned the keyword “dl” to it, so when viewing a web [...]