Talk about add-ons and extension development.
Yesterday Google released a very nifty upgrade to their search tool, which allows you to choose from a list of popular hits depending on what you are typing on the search box.
Anyways, this new toy was too cool to leave aside so I spent most of the night hacking together a proof of concept Firefox extension to add Google Suggest like behavior to the browser's search tool. Just to show how great XUL/XBL/XPCOM is.
I've also created a small search plugin for Google Suggest so the extension only runs when this custom search plugin is in use to avoid any conflicts with the main Google search plugin.
GSuggest Firefox Plugin:
Obviously Google's is much better hehe.. and there are still some issues with GSuggest's results list (ie: lack of keyboard navigation) but you can test it out by following the steps below.
Go to: http://www.loconet.ca
1. Install GoogleSuggest search plugin-in
2. Install GSuggest extension
3. Restart Firefox
4. Choose GoogleSuggest as the search engine in the search toolbar
- Mainly tested on win2k ff1.0!
- The result list lacks of keyboard navigation, you need to use your mouse to select result to query
- On Linux FF 1.0 the result list is not updated properly.
- Depending on how fast you type, there might be some lag in getting the result list to refresh properly
- Obviously if google decides to change delivery format, script location, etc. this will break..
Anyways, I'm still learning xul so i decided to make this as proof of concept to learn some more. Hopefully someone will pick up and implement a proper more robust extension with the same idea ..or maybe I will when i get more familiar with xul/ff's insides
god, this sucks..... I mean.. this rocks
Love it, it's true GG's sugest is much better, but I see a billion potentials in this extension... lovely work loconet, hopefully you'll continue developing it.
bug: The suggestions box does not appear right under the search bar, instead it appear in the middle of my tab bar (but vertically alligned to the search bar).
You might want to check incompatilibity with Search Bar Resizer extension.... I think that's what's causing it.
Haha, yah it does suck but thats ok
Yah i've noticed that as well, most of the time it aligns properly, sometimes it doesn't. I'm most likely not showing the popup correctly.. hmm.
As you mentioned you cannot browse the results with the keyboard, another thing is that there is no history of previous searches. A suggestion is to use a list with two columns, one with the google suggestions, and one with previous searches, both browsable with the arrow keys (left/right to move between columns). Don't know how difficult this would be to implement though.
Oh, and if I don't select a google suggestion but hit enter instead, the list doesn't disappear.
this rocks! i was also hacking away at an extension, but couldn't figure out all the XBL stuff (I have never played with XBL before). this is so cool, a suggestion- the method that tells if it is GoogleSuggest-able, it should be not a regex (that is processor intensive), rather you should have it set an attribute based on something in the search plugin, that way other search plugins could take advantage of this functionality.
Ah! that is a much better solution. I'm still new with this stuff, I didn't think of accessing it as a property of the plugin itself..but it only makes sense . same idea should apply for the data url. good stuff!
awesome- thanks for making this!
Just to tell that I wasn't able to install the extension (the search plugin went ok) because, i think, I am using a french version of Firefox. Firefox tell me after trying to install it that this extension is not compatible and that it requires v1.0 (which i am using!).
This might be from bug 62395 (https://bugzilla.mozilla.org/show_bug.cgi?id=62395)
There may be a problem with this extension:
1. Using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041215 Firefox/1.0+, a trunk installer release, with WindowsXP Home.
2. Three times in the past few hours, after installing the search engine and the extension, Firefox has crashed while accessing a Google suggestions list.
3. Talkback does not work for me: I know, as I've tried many times for over a year, and have only managed to get one report submitted. Thus, I cannot, unfortunately, supply any specific data from Talkback to verify or disprove that the problem is with the extension. I can only state that I've been using this Firefox release rather extensively for over twenty-four hours without any crashes, except for those I've experienced when using the Google Suggest extension.
I think any extension causing Firefox to crash should be reported in Bugzilla... even if an extension has bugs, there are very few things that extensions should be allowed to do that would result in a crash. Certainly, it sounds as though this extension isn't doing anything particularly out of the ordinary.
Well, I did as you suggested, only to receive a comment that this should not have been reported in Bugzilla, and the bug report I filed marked as invalid.
So, herewith your own personal Bah! Humbug!
(Anyone else desiring their own Bah! Humbug!, just let me know, I've got plenty...).
Who is online
Users browsing this forum: No registered users and 1 guest