In the last post I created the 'perfect' Digg Bookmarklet - now I will try to do the same for Del.icio.us and Furl bookmarklets. It follows the concepts introduced in the post about meta tags. The principle will be the same as the one used in the Digg bookmarklet - SMP or Selection/Meta/Paragraph approach.
Getting the Title and URL is done using
document.location.href. To create a suitable description, the following method is used...
- First, see if any text is selected in the document. If so use that as the description.
- If nothing is selected, search for the 'description' meta tag. If present use that.
- If these two methods fails, we use a failsafe - the first paragraph(
ptag) is fetched and used.
To install the bookmarklet, drag the above link to your bookmarks toolbar. This should create a new button on the toolbar. Now visit any page you want to submit to the bookmarking service and hit this button. The bookmarklet will open a new pop up window with all the information filled in automatically.