Closed dccoder84 closed 3 years ago
Good idea. I think we should be able to do this with search.get. So far I have resisted doing this because it requires adding a new permission.
If you need inspiration how to code this you can have a look at how Firefox itself implemented it. The GUI has to be enabled and is behing a flag under about:config. You have to set the variable browser.urlbar.update2.engineAliasRefresh to true then you will see an additional "Add" button add the bottom of about:preferences#search. If you click this button you will get a dialogue which is similar to you addon. The "add search enginge" button within the dialogue will grey out if the search engine name is already available. The best thing would be if somebody provides a patch so that this dialogue will also have an option to set an icon. Then your addon wouldn't be that important anymore. Of course your addon still has more options and would still be useful d-(' ' d-).
Cool, thank you very much :)
Sorry but it doesn't work correctly. I can still type "eBay" without getting a feedback. And in the URL-Bar-Three-Dots-Dropdown-Menu there won't be an entry "Add Search Engine" then.
@dccoder84 Is it possible that you have that search engine installed but hidden? i.e. no blue in about:preferences#search.
I don't know what's the problem but everything works fine when using a fresh profile and a new Firefox installation.
I wondered why I cannot add eBay as a search engine. Turns out the name was already used internally some way even if I hadn't installed an eBay search. So "ebay" instead of "eBay" as search name worked but it would be nice if the user could get some type of feedback otherwise this is quite confusing. Tested with Firefox 84.0.2.