次の方法で共有


Creating your own Internet Explorer 8 Accelerator

 

I recently installed the new RC1 version of IE 8. image
Yes, it’s not release yet, and not perfect yet,
but don’t mind me saying – It’s already better then IE 7.
It works faster, and got great new features.

One of the new features is Accelerators.
There are plenty you can find here.

Personally I like using Morfix to translate text to Hebrew
But could not find a proper translation accelerator for Morfix just yet…

So I decided to check what does it take to built one for myself.

by nigelpepper

Searching the web quickly popped up this nice guide.

It turns out that it’s pretty simple and hardly needs “developer skills”.
All you need is 2 simple files.
1. An XML file for the accelerator definitions.
2. An html file for the installation phase.

In my case, I created Morfix.xml this way:

    1 <?xml version="1.0" encoding="UTF-8"?>

    2 <openServiceDescription

    3     xmlns="https://www.microsoft.com/schemas/openservicedescription/1.0">

    4   <homepageUrl>https://www.morfix.co.il</homepageUrl>

    5   <display>

    6     <name>Translate using Morfix</name>

    7     <icon>https://www.morfix.co.il/favicon.ico</icon>

    8   </display>

    9   <activity category="Translation">

   10     <activityAction context="selection" >

   11       <execute action="https://milon.morfix.co.il/?q=">

   12         <parameter name="q" value="{selection}" type="text" />

   13         <parameter name="sourceid" value="ie8-accelerator" type="text" />

   14       </execute>

   15     </activityAction>

   16   </activity>

   17 </openServiceDescription>

   18 

All I needed to change in the “basic template” are the highlighted values:
1. Morfix homepage URL.
2. The name of the accelerator that will appear on the context menu.
3. Morfix icon for the context menu. I just used the one on their one site, I think it’s nice.
4. The category under which to install the accelerator.
    It would normally be “Translate” but you can have only one default on each category,
    and I didn’t want to lose my current default, so I added it as “Translation”.
5. This is the most important value. this is the Query string form Morfix query.
    You can simply get it by running a translation on the site:

image image

5. The last value is just the query string variable, which normally can be extracted from the previous values
     between the ? and the = chars.

Now we should create the HTML file for the installation. In my case I called it AddMorfix.htm :

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title>Add Morfix Accelerator</title>
    <meta content="text/html; charset=windows-1255" http-equiv="Content-Type"/>
    <meta name="GENERATOR" content="MSHTML 8.00.6001.18372"/>
</head>
<body>
    <button id="myButton"
   onclick="window.external.AddService('https://www.ofeks.info/Download/Accelerators/Morfix/Morfix.xml')"> 
                        Press to add Morfix IE8 Accelerator Add-On</button>
</body>
</html>

Again, all I needed to change in the “basic template” are the highlighted values:

1. A nice title for the page.

2. The location of the previous xml file hosted on any web server…

3. Nice text for the installation button.

Now, simply host this html file on any web server, and browse to it.

This is how it looks like:

image

You can mark the accelerator as default in IE’s  “Manage Add-ons” Dialog.

This would be the final result:

image

You can test drive the accelerator by installing it from here:

https://www.ofeks.info/Download/Accelerators/Morfix/AddMorfix.htm

Have fun,

Eli.

Comments

  • Anonymous
    November 01, 2010
    Hi! First of all, thank you for your work. Second of all, can you please make it open in a small window like the (awful) bing translator? Thanks.

  • Anonymous
    November 02, 2010
    Actually, it is technically possible, but since Morfix do not expose this as a service, it would also be illegal, so I can't post it online. In Similar cases one would expect Morfix to create a suitable preview page that can get the data, and create this preview page in response. without that, you will need a service of your own to extract the data from Morfix website , customize it and display it, which is sadly illegal. Eli.