Open main menu

CDOT Wiki β

Changes

Localized Search in Firefox Search Box: Release v.03.2

42 bytes added, 21:37, 14 February 2008
no edit summary
* Refer to the code modifications for [http://zenit.senecac.on.ca/wiki/index.php/Localized_Search_in_Firefox_Search_Box:_Release_v.03.1#Code_Modifications release version .03.1].
 
1. [http://lxr.mozilla.org/seamonkey/source/browser/components/search/content/search.xml search.xml]
* [http://lxr.mozilla.org/seamonkey/source/browser/components/search/content/search.xml#332 rebuildPopupDynamic() method]: When the user first clicks the searchbar's button to display the engine list, remove the dynamically added search engine if it is on the list. Use a try-catch block to first check that the global variable ''gAddedEngine'' has a non-null value. Then, use the searchbar's ('''this''') search service [http://lxr.mozilla.org/seamonkey/source/browser/components/search/nsSearchService.js#2697 getEngineByName() function] to "get" the engine if it is on the list and use . Employ the searchbar's search service [http://lxr.mozilla.org/seamonkey/source/browser/components/search/nsSearchService.js#2741 removeEngine() function] to remove it from the list. Set the global variable ''gAddedEngine'' to '''null'''.
4. Navigate Click Firefox's searchbar button to a different web site that offers a display the list of search engine pluginengines. Observe that the dynamically loaded search engine that was dynamically "Added" at the previous web site plugin is no longer on the list of installed engines but the search plugin for the current web site has been dynamically loaded and it appears is now listed as an "Add <Search Engine>" menu item. If you opt to "Add" the current engine for searching back to the list of installed engines, it will remain as an installed engine when you navigate to a different web site.
1
edit