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:

<?xml version="1.0" encoding="UTF-8" ?>
<os:openServiceDescription
  xmlns:os="http://www.microsoft.com/schemas/openservicedescription/1.0">
  <os:homepageUrl>http://www.delicious.com</os:homepageUrl>
  <os:display>
    <os:name>Add to Delicious</os:name>
    <os:icon>http://www.delicious.com/favicon.ico</os:icon>
    <os:description>Add this page to Delicious</os:description>
  </os:display>
  <os:activity category="Add">
    <os:activityAction context="document">
      <os:preview action="http://www.delicious.com/save?url={documentUrl}" />
      <os:execute method="get" action="http://www.delicious.com/post">
        <os:parameter name="url" value="{documentUrl}" />
        <os:parameter name="title" value="{documentTitle?}" />
      </os:execute>
    </os:activityAction>
  </os:activity>
</os:openServiceDescription>

This is a simple proof of concept, but you can use it before Delicious publishes official version. It wears “Works on My Machine” seal:

works-on-my-machine-starburst

Accelerators are added to IE using javascript code, that, in most cases, is attached to a button onClick event: <button id="myButton" onclick="window.external.AddService('http://weblogs.asp.net/blogs/draganpanjkov/IE8/addDelicious.xml')">Add to Delicious</button>

Here is a button you can use to add this accelerator to Internet Explorer 8 RTW

 

I hope you’ll find it useful :)

Dragan

Published Friday, March 20, 2009 3:11 PM by panjkov

Comments

# Pages tagged "seal"

Friday, March 20, 2009 2:21 PM by Pages tagged "seal"

Pingback from  Pages tagged "seal"

# Writing IE8 accelerator in 15 minutes (bookmark on Delicious) | IT Questions

Pingback from  Writing IE8 accelerator in 15 minutes (bookmark on Delicious) | IT Questions

# Interesting Finds: 2009 03.20~03.22

Saturday, March 21, 2009 11:06 PM by gOODiDEA.NET

Web Writing IE8 accelerator in 15 minutes (bookmark on Delicious) Constructing Web Interfaces on the

# Interesting Finds: 2009 03.20~03.22

Saturday, March 21, 2009 11:07 PM by gOODiDEA

WebWritingIE8acceleratorin15minutes(bookmarkonDelicious)ConstructingWebInterface...

# Accelerators and Microsoft Internet Explorer 8 &laquo; On-Site Computer Services, Inc. in New Orleans Blog 504-469-6991

Pingback from  Accelerators and Microsoft Internet Explorer 8 &laquo; On-Site Computer Services, Inc. in New Orleans Blog 504-469-6991

# IE8 Accelerator Development Resources

Wednesday, April 08, 2009 3:30 PM by Chris Eargle

IE8 Accelerator Development Resources

# re: Writing IE8 accelerator in 15 minutes (bookmark on Delicious)

Tuesday, April 28, 2009 8:49 PM by Ed Lanphier

Nice beginner article on writing IE8 Accelerators. See: http://bit.ly/vJKbW

For readers who use Firefox and are new to IE8, I wanted your readers to be aware that Firefox has a version of Accelerators too, it is called “KALLOUT - Accelerators for Firefox” It’s available as a free add-on through Firefox. See: http://bit.ly/vJKbW

Accelerators you or others develop for IE8 will actually work directly with KallOut-Accelerators for Firefox so users can stick with Firefox if they want and still get the benefits of the community-developed accelerator.

EL

# re: Writing IE8 accelerator in 15 minutes (bookmark on Delicious)

Monday, June 15, 2009 10:52 AM by Aj

How can you send an upgrade of your accelerator XML file?

# re: Writing IE8 accelerator in 15 minutes (bookmark on Delicious)

Monday, June 15, 2009 11:03 AM by panjkov

In general, you should only publish new version of your accelerator to the same place as previous one, and when you click on it, instead of "Add" optiopn you'll be able to replace it.

# re: Writing IE8 accelerator in 15 minutes (bookmark on Delicious)

Tuesday, November 03, 2009 2:26 PM by Jim

I tried to write a useful accelerator. Let me know:

www.pressthered.com/how_to_create_an_ie8_accelerator

# Maxim Fridental &raquo; Blog Archive &raquo; MDBG Accellerator for IE8

Wednesday, November 18, 2009 5:56 PM by Maxim Fridental » Blog Archive » MDBG Accellerator for IE8

Pingback from  Maxim Fridental  &raquo; Blog Archive   &raquo; MDBG Accellerator for IE8

# Google Shows Security Focus in New Extensions For Chrome at ITSecurity

Pingback from  Google Shows Security Focus in New Extensions For Chrome at ITSecurity

# IE8 Accelerator Development Resources

Monday, April 19, 2010 12:37 AM by KodefuGuru

IE8 Accelerator Development Resources

Leave a Comment

(required) 
(required) 
(optional)
(required)