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.
Step by Step:
1. Open Notepad and copy the following code into it:
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”
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.
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”