Writing IE8 accelerator in 15 minutes (bookmark on Delicious)
Being teased from my colleague Radenko (http://blog.developers.ba) that IE8 accelerators are not so useful as FF addons, and that he can’t find appropriate accelerator for Delicious, I decided to find him one on internet using search and www.ieaddons.com. I couldn’t find anything than this (yes, it has more options and no, I haven’t read it’s source code before I wrote my own), created to IE8 while it was in beta 2. However, I wanted to see how difficult it is to create simple one, and decided to try writing it.
Accelerators are XML files that let you act on data in a web page (from MSDN):
Accelerators let you act on data in a Web page. You can select a few lines of text and send it to a blog or email it with a click. Using a previously installed Accelerator, this action "executes" the desired activity by navigating to the desired Web site with the selected portion of the article already available in the edit field. You can also act on data without going to another Web site using "preview" Accelerators; for example, you can translate a word or map an address. Hover over an Accelerator with your mouse to view the preview window.
First, I found “OpenService Accelerators Developer Guide” on MSDN, that is very detailed, contains fields description and one full sample. Then, I found page on Delicious blog that contains code for “Bookmark this page” button.
Basically, it’s needed to pass page URL and Title to “Save a new bookmark” page on Delicious, and of course, you need to be logged in to your account.
Code for this accelerator:
This is a simple proof of concept, but you can use it before Delicious publishes official version. It wears “Works on My Machine” seal:
Accelerators are added to IE using javascript code, that, in most cases, is attached to a button onClick event:
Here is a button you can use to add this accelerator to Internet Explorer 8 RTW
I hope you’ll find it useful :)
Dragan
Cross Posted from http://weblogs.asp.net/draganpanjkov