Internet Explorer Enhancement

betsmate

At the Start
Joined
Dec 7, 2004
Messages
5,752
Ok, a bit geeky this one, but I have spent the last hour working out how to do this so I thought I would share…

How often are you reading a web page and come across a term that you don’t understand or want to know more about? Personally I am forever copying and pasting words into Google, Wikipedia or a dictionary.

Now being inherently lazy, the number of mouse-clicks that this takes was starting to frustrate me, so I have come up with the below solution to save time. If you choose to do this (I take no responsibility for wrecked computers) then you can simply highlight any word on a web page, right-click on it then choose an option from the context-menu and the search will be performed for you in a new window.

menu.gif


Step by Step:

1. Open Notepad and copy the following code into it:

<script LANGUAGE="JavaScript">
var parentwin = external.menuArguments; var doc = parentwin.document;
var sel = doc.selection; var rng = sel.createRange(); var str = new String(rng.text);
if (str.length > 0)
parentwin.open("http://dictionary.reference.com/browse/"+rng.text, "_blank");</SCRIPT>

2. Save it anywhere on your PC as Dictionary.htm (make sure you select All files as Save-As type otherwise you will create a text file)

3. Launch your registry editor (Start > Run > regedit)

4. Navigate to the key HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt

5. Create a new key and name it: &Dictionary

6. Set the Default Value of the key to: file://h:\Program Files\IEMenu\Dictionary.htm (where that is the location of the file that you created)

7. Create a new DWORD value for the key with a value of: 10

8. Close REGEDIT and any open browser windows.

9. Re-open Internet Explorer, navigate to any page, highlight a word, right-click and then choose Dictionary from the context-menu. A new browser window will open with the search result for the word you highlighted at Dictionary.com.

You can repeat the above process for as many sites as you like; just replace the URL in the Name.htm, ensuring that you included the +rng.text in place of the search term, save as a different file name and create a different key in the registry. Some of the others that I have done:

Search in Google UK:
parentwin.open("http://www.google.co.uk/search?q="+rng.text, "_blank");

Search in Wikipedia:
parentwin.open("http://en.wikipedia.org/wiki/"+rng.text, "_blank");

Search in Youtube:
parentwin.open("http://www.youtube.com/results?search_query="+rng.text, "_blank");

Search in Technorati:
parentwin.open("http://technorati.com/search/"+rng.text, "_blank");

Translate word/phrase from French to English
parentwin.open("http://translate.google.com/translate_t?text="+rng.text+"&hl=en&langpair=fr|en&tbb=1&ie=utf-8", "_blank");

Notes:

- This only works if you use Internet Explorer as your browser
- If you want the search results to open in the same browser window, not a new one, replace "_blank" with “_top”
 
Edit:

Step 7 should read:

7. Create a new DWORD value for the key named Contexts with a value of: 10
 
I have to say how impressed I am - continually - by the level of IT expertise on this august forum. From choosing a new laptop, to debugging, to downloading hot CDs, seeing films for free, etc., it's a little marvel!
 
It's ridiculous that Microsoft make you go to such lengths to implement something as useful as that.
 
If you download their own Windows Live Toolbar then they do include the option to do this, but the only search available is a Windows Live Search :ph34r:

Quero toolbar is a 3rd party app that does something similar but you are restricted to the 18 sites that they specify and I specifically wanted some of the above i.e. the translator.

IE Toys is another 3rd party app that does the same thing with 5 sites (except it didn't work for me - threw errors) plus it includes some additional functionality that I didn't want.

In the end the I stripped out the useful bits from all of those apps and came up with the above for myself.
 
Back
Top