16 декабря 2005

Ken's Meme Deflector: XBlogThis!: An Extended BlogThis! Button

Ken's Meme Deflector: XBlogThis!: An Extended BlogThis! Button:
XBlogThis!: An Extended BlogThis! Button
If you keep a with Blogger, you have probably come across the BlogThis! button. It is small bit of Javascript that you can add as a button to your bookmark toolbar that generates a post from the text that you have highlighted on a page.

If you run a link blog, such as the Meme Deflector, the BlogThis! button can be a huge time saver. Instead of flipping between two browser windows — one with the page that your blogging, and another with the Blogger edit page — while you copy text and links from one to another, BlogThis! generates the post in a single button click.

The post it generates is fairly straightforward. For a title, it uses the title of the page you are blogging. It begins the post with a link to the page, using the title as the link text, followed by any text you have highlighted on the source page, wrapped in double quotes.

It's a good start, but it isn't quite what I needed for the Meme Deflector. There is some room for improvement:

* I often quote multiple lines from the source page. When I do, I have to replace the double quotes with
tags. That's an annoying bit of tedium that I'd be happy to eliminate.
* That doubly goes for Technorati Tags. I've recently fallen into the habit of tagging my posts. As each tag is a link of the form

,

you can imagine how tedious it is to type these out by hand.
* I also found it somewhat annoying to search through the text of the generated post to replace the title text with an author's name.

Enter XBlogThis!, an extension to Blogger's BlogThis! script:

XBlogThis! ? Drag this into your browser's link bar.

The usage is similar to that of the BlogThis! button. Highlight some text in the page that you want to blog about and press the XBlogThis! button.

XBlogThis! Frame

This will pop up a frame where you can specify an author, technorati tags (as a comma-delimited list), and whether to quote with quotation marks or
tags.

It has only been tested on Firefox has been tested on Firefox, Safari, and Opera. Your mileage with other browsers may vary.

Update (2005-08-28): Shaun noticed that the technorati tags are missing the rel="tag" attribute. Stupid mistake on my part. If you picked up the bookmarklet before this update, I recommend that you delete the old bookmarklet and replace it with the current. John supplied a fix which has now been incorporated into the above link. Thanks Shaun and John!

Update: John offers two other versions of the bookmarklet:

The first points to an individual's del.icio.us account (in this case, mine) & is useful for generating the technorati / del.icio.us combo tags that are the crucial tool for the categories method used here...

The second version takes a cue from Graywolf, and points to the "all posts for a given tag" page on del.icio.us.

Update: Jonah Chanticleer writes that the XBlogThis! bookmarklet works with the Safari browser

Update (2005-09-27): Dion van Huyssteen noticed that the close button was not working on Opera 8.5, then generously provided a fix to make it work. The bookmarklet now contains that fix, along with another nice enhancement provided by Dion: the tags are now enclosed in
tags (the division id class is "Tags"). So now, not only can you use the bookmarklet in Opera, you can also format the tags with CSS. Thanks for the fix, Dion!
Technorati tags: , , ,