Open main menu

CDOT Wiki β

Changes

Localized Search in Firefox Search Box

2,962 bytes removed, 20:55, 10 February 2008
no edit summary
My code modifications alter the original addEngine() function by using the nsIBrowserSearchService object to check if the new search plugin is NOT on the list. If it is not on the list, I "Add" the search plugin by calling the [http://lxr.mozilla.org/seamonkey/source/browser/components/search/nsSearchService.js#2726 addEngine() function] in the [http://lxr.mozilla.org/seamonkey/source/browser/components/search/nsSearchService.js nsSearchService.js] file. This function completes the important step of creating a '''new''' nsISearchEngine object. It is this type of object that is required by important methods in search.xml, such as [http://lxr.mozilla.org/seamonkey/source/browser/components/search/content/search.xml#208 observe()],[http://lxr.mozilla.org/seamonkey/source/browser/components/search/content/search.xml#262 offerNewEngine()] and [http://lxr.mozilla.org/seamonkey/source/browser/components/search/content/search.xml#290 hideNewEngine()]. I then push the anonymous JavaScript ''engine'' object onto the the list of "hidden" search engines, the ''browser.hiddenEngines'' array. It is not necessary for me to add any of the auto-detected search plugins to the ''browser.engines'' array at this point. My objective is to dynamically "Add" the auto-detected search engines, therefore they are all considered to be "hidden" engines for now and they are not displayed on the searchbar as "Add <Search Engine>" menu items.
 
== '''Release Target for v.03''' ==
 
* When the user navigates away from the web page with the search engine plugin, dynamically remove the search plugin.
 
 
== '''Release Target for v.04''' ==
 
* TBA
 
 
== '''Release Target for v.05''' ==
 
* TBA
 
 
== '''Release Target for v.06''' ==
 
* TBA
 
 
== '''Release Target for v.07''' ==
 
* TBA
 
 
== '''Release Target for v.08''' ==
 
* TBA
 
 
== '''Release Target for v.09''' ==
 
* TBA
 
 
== '''Release Target for v1.0''' ==
 
* TBA
 
 
= '''Resources''' =
 
[https://bugzilla.mozilla.org/ Bugzilla@Mozilla]
 
[http://mxr.mozilla.org/ Mozilla Cross-Reference]
 
[http://developer.mozilla.org/en/docs/Main_Page MDC- Mozilla Developer Center]
 
[http://wiki.mozilla.org/Search_Service:Code_Design#Automatic_Detection Search Service: Code Design - Automatic Detection]
 
[https://addons.mozilla.org/nl/firefox/addon/3544 SearchLoad Options :: Firefox Add-ons]
 
== '''Files''' ==
 
[http://mxr.mozilla.org/firefox/source/browser/base/content/browser.js browser.js]
 
[http://mxr.mozilla.org/firefox/source/browser/components/search/content/engineManager.js engineManager.js]
 
[http://mxr.mozilla.org/firefox/source/browser/components/search/nsIBrowserSearchService.idl nsIBrowserSearchService.idl]
 
[http://mxr.mozilla.org/firefox/source/browser/components/search/nsSearchService.js nsSearchService.js]
 
[http://mxr.mozilla.org/firefox/source/browser/components/search/content/search.xml search.xml]
 
 
 
= '''Project-Related Bugs''' =
 
[https://bugzilla.mozilla.org/show_bug.cgi?id=236587 Bug 236587 - Allow bookmark keyword searches from the search bar]
 
[https://bugzilla.mozilla.org/show_bug.cgi?id=249481 Bug 249481 – User-defined searches available not only as bookmark keywords, but also from the Search box]
 
[https://bugzilla.mozilla.org/show_bug.cgi?id=374268 Bug 374268 – Quicksearch/keyword should be integrated into search engine manager]
 
[https://bugzilla.mozilla.org/show_bug.cgi?id=261124 Bug 261124 – Textbox context menu should have "Add to Search Bar..."]
 
[https://bugzilla.mozilla.org/show_bug.cgi?id=335448 Bug 335448 – Autodetect repeated use of a search field, and ask the user if they want that engine added to the browser search box]
 
[https://bugzilla.mozilla.org/show_bug.cgi?id=360907 Bug 360907 – Search current site with OpenSearch]
 
[https://bugzilla.mozilla.org/show_bug.cgi?id=408244 Bug 408244 – show opensearch plugin availability same as feed availability]
 
[https://bugzilla.mozilla.org/show_bug.cgi?id=405443 Bug 405443 – Making search engine discovery more discoverable]
 
[https://bugzilla.mozilla.org/show_bug.cgi?id=356332 Bug 356332 – Select default search engine again after searching with another]
 
[https://bugzilla.mozilla.org/show_bug.cgi?id=384124 Bug 384124 – Option to reset search bar engine to default when starting Firefox]
 
 
= '''Project News''' =
 
For up-to-date information about my project, visit my blog: [http://kmsingh.blogspot.com/ Kerry's Open Source Blog]
== '''Release Target for v.03''' ==
1
edit