04.10.04

Higher Capacity Context Menu Searches

Posted in Web at 7:11 am by Danny Dawson

Well, if that isn’t just the spiffiest entry title, I don’t know what is.

Jaap A. Haitsma has published Dictionary Search 0.5, an extension for Mozilla/Firefox that makes it easy to perform follow-up research on a webpage you might be reading. Just use the mouse cursor to highlight some text, right-click, and select the engine/website you want to search. I use it to search IMDb, Netflix, and Amazon for information about books, music, and movies (not respectively), to do further research on google (search, news, and images), salon.com, metafilter, and slashdot, as well as find definitions (surprise!). It’s incredibly useful, and it can be configured to search the databases of just about any website that uses GET headers in their search technology.

The only problem I ran into: Jaap’s default compilation only allows for four search engines to be configured at once, which isn’t quite enough for me. So I delved into some source, did a little tinkering, and upped it to eight: Download the updated installer here. <Updated 4/19/04 for bug fixes>

A couple of the engines I use,as they should be formatted for Dictionary Search (right-click and Copy Link Location):

Amazon.com
IMDb
MetaFilter
Netflix
Slashdot
Salon.com
eBay

13 Comments »

  1. michele said,

    April 14, 2004 at 6:50 pm

    this really has nothing to do with, um, this post. but in your links, the one to gene goes to jacob’s page. i am incredibly bored right now, can you tell?

  2. Danny Dawson said,

    April 15, 2004 at 9:35 am

    Fixed. Thanks.

  3. Sam said,

    April 16, 2004 at 8:18 pm

    Great modification! This is exactly what I have been looking for. Thanks!

    Here’s a problem: For reasons unknown to me (a non-expert), with both the unmod and mod versions of Dictionary Search (v.0.5), the GUI is truncated, cut off before the bottom. With the Mod in place, this occurs midway down the URL field for Dictionary 7. There are no “OK” or “Save” or “Cancel” buttons (not sure what the proper names are, as I have yet to see them). I tried uninstalling and reinstalling the unmod Extension, with no change.

    My work around was to use either about:config or Preferentials to configure the extension. However, the Mod’s added searchs (#5-#8) do not show up in either, making this route unavailable.

    I have had some luck “tabbing” to the “Save” button, but ….

    Any ideas on what is causing the Extension GUI display problem, and why the mod’s added searches don’t show up under DictionarySearch in either about:config or Preferentials?

    Thanks for the great mod, and for your assistance!

  4. Sam said,

    April 16, 2004 at 8:25 pm

    For Truncated GUI problem - System info: Win2kP v5-SP4; Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 (Some Extensions - TBE, Compact Menu, Hide SearchBar, ToolBar Enhancements, AdBlock, Preferential, Optimoz).

  5. Danny Dawson said,

    April 16, 2004 at 11:15 pm

    I’m guessing this has to do with your display resolution. I’m running at 1024×768, and have found that running under 800×600 or 640×480, the GUI is cut off either just above the OK, Cancel, and Help buttons, or somewhere in the middle of Entry #7, respectively.

    I’m currently looking into the code to see if I can figure out how to add scrollbars or resize ability to the Settings dialog. This would/should solve the “Truncated GUI problem” that you’re seeing.

    Unfortunately, I’m probably less of a code expert than you are, so it may take me a little while to figure out. (The mods that I made were done by trial and error combined with a little persistence.) Luckily, though, I’m currently unemployed and I’ve got nothing else to do. I’ll be working on this tonight.

    As to why the extra added searches aren’t showing up in about:config or the Preferential extension, I can’t explain. They show up in about:config for me, but I don’t use Preferential, so I can’t check that. Maybe you need to restart your browser in order to refresh the user.js file?

  6. Sam said,

    April 18, 2004 at 9:04 am

    Hi Danny,

    Thanks for your quick response. Screen resolution is 1280 x 1024 on a 19″ CRT. I checked lower settings, and this didn’t change the amount of the truncated area of the GUI much at all, but this certainly was an area ripe for investigation, and thanks for the suggestion.

    I had restarted FF a couple of times prior to noticing the lack of extra searches in about:config and Preferential. The good news is that interestingly, they are all there now. I do not know if that only occurred subsequent to my making entries for them. At least they are there now, so I can make any future changes there.

    I will check back to see if there have been any developments in the Sizing/Scrolling department. I never understood why folks make GUI’s at a set and unchangeable size, but then again, I have no idea what is involved in coding to make it configurable either!

    Thanks again for your great mod, and assistance!

  7. Danny Dawson said,

    April 18, 2004 at 9:37 am

    Sam:

    I hadn’t posted anything yet because none of the code modifications I tried were successful once I lowered my screen resolution, but given your problem with a higher res, one solution I tried might help you. I’ve dropped a “window.sizeToContent();” into the onload event handler and omitted the fixed pixel size. This doesn’t fix the problem with lower screen res’, but it’s worth a try for your situation. Download here

    I still don’t know how to add scrollbars or resize ability to the Dialog box. I’ve tried many things: all unsuccessful. You’d think that having those turned on would be the default behavior (at least the resize ability), and I would only have to look for something in the code to delete or turn off, but alas…

  8. Sam said,

    April 19, 2004 at 12:36 pm

    Hey Danny, just downloaded and installed your A18 mod and it works great! Thanks!

    There is a “Help” button now also visable, but it produces a tiny scrunched “window”, with only the Title Bar present. I don’t know if this differs, as this is the 1st time I have been able to view this lower area of the GUI, let alone click “Help”. It doesn’t matter to me, but I thought you might want to know.

    Now I can work on figuring out the proper Search strings for AllTheWeb, RottenTomatos, and a couple of others, as well!

    Good luck on the job situation, I know what that is like!

    Thanks again!

  9. Oi! said,

    April 19, 2004 at 1:39 pm

    If I understood any of that I’m sure I’d be really impressed; not wanting to criticise but could you post something less technical for simpletons like me; like the new layout by the way.

  10. Danny Dawson said,

    April 19, 2004 at 5:48 pm

    Sam: Apparently Jaap had omitted the help xul from version 0.5. He corrected this on Saturday with version 0.5.1, and I updated it with my mods to become 0.5.1d. Download at one of the links above. Glad I could be of assistance. Hve fun with it.

    Hey Chris: My current stylesheet is a direct rip from Movable Style. I give them a little nod in the bottom left of the index page. When I get embarassed enough, I’ll whip up something more original.

  11. Sam said,

    April 22, 2004 at 10:11 pm

    Hi Danny, Everything is “Search Heaven” now! Thanks again!

  12. Sam said,

    April 16, 2005 at 3:49 pm

    Danny, I, and others, continue to rely heavily on your great 8 search Mod to the Dictionary Search Extension. Sadly, it seems the recent FireFox update from 1.0.2 to 1.0.3 seems to have broken it. The 8 searches no longer appear in the contect menu. They are all still present under about:config. Would you please update it so it will work again? Thanks very much! Sam [prefer not to have actual email published, but will provide privately]

  13. Danny said,

    April 25, 2005 at 9:20 am

    Sam,

    I haven’t updated my DS mod since I started using the Context Search plugin in July of last year. I find it to be more robust and extendable without having to delve into modifying someone else’s code. Instead of having to parse the URLs of each new search engine you want to add, as long as a Mycroft plugin exists already, installing a new search engine is as easy as clicking a link. If the search engine you want to use hasn’t had a Mycroft plugin created for it yet (e.g. your corporate intranet), creating one is incredibly simple. Open up the “google.src” file located in your Firefox install’s “searchplugins” directory (usually “C:\Program Files\Mozilla Firefox\searchplugins”) and alter the name, description, action, and input fields to match your own desired engine. I would be happy to do this for you if you needed; alternatively I would be happy to describe in simpler terms (maybe even with a blog post, you never know) what the various fields in a Mycroft plugin represent.

    If you’ve tried the Context Search plugin and you still think the Dictionary Search plugin fits your needs better, I could be persuaded to update my modification for you if you can tell me exactly why you prefer it. Just let me know.

Leave a Comment

*Required Fields are in Pink*