|
|
Automate Dictionary word lookup in Firefox
This is a nice hint, but it still requires that you type a URI into your browser. An earlier followup pointed out that Cntl-Cmd-d does the job automatically, but that only works in Cocoa apps (and frankly I've found it to be a bit spotty -- sometimes it works, sometimes not). If, however, you are partial to Firefox or any other non-Cocoa browser (though this will work in Cocoa browsers as well, of course), you can get almost the same functionality with a little javascript. Specifically, create a bookmark called "Dict" and for the location enter:
Stick that bookmark on your Firefox toolbar. Now you can call up (a running copy of) Dictionary.app for a definition of a word you come across while browsing just by highlighting it and clicking on your new bookmark. (Just clicking on the bookmark without highlighting anything will bring up a dialog box in which you can enter a word manually.)
Note the same trick can be used to call up Google for definitions. In this case, create a bookmark called "GoogleDict" (or whatever) and use the following code for the location:
More generally, you can alter this code to do a search on any site with a searching mechanism -- Wikipedia, Amazon (nice for looking up highlighted book titles or authors), whatever. Just go to the site in question, enter a search string, and use the resulting URI as the basis for revising the javascript to define the location of a new bookmark for searching that site. Just replace the specific search string you used with "x" in the javascript, as that is the variable that is carrying the string that you've highlighted.
BTW, I did not invent the basic code here. I've been using it for so long I don't remember where I found it, but it is quite likely that I saw it in a MacOSXhints hint!
Automate Dictionary word lookup in Firefox
Your javascript does not seem to work with OmniWeb 5.5. It always comes up with a dialog box with an empty text box and I have to enter the search string (although it is already highlighted in the webpage) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.06 seconds |
|