3

I try to write my very first webextension, following this tutorial. I wrote a manifest.json and added a background script as I want to provide global functionality: I want to clear the search bar once the search was performed - basically it's this, but for Firefox 57+.

My question: How can I access the search bar at all?

I found a list of available APIs, including the tabs, the menus, and so on, but no search bar...

crusy
  • 1,424
  • 2
  • 25
  • 54

4 Answers4

3

Currently it is not possible. You might want to file a bug for it: https://bugzilla.mozilla.org/

Smile4ever
  • 3,491
  • 2
  • 26
  • 34
  • 1
    Thank you. I just did [here](https://bugzilla.mozilla.org/show_bug.cgi?id=1418024), which is my first submitted bug as well, so hopefully I didn't do it wrong :) – crusy Nov 16 '17 at 19:14
2

I filed a bug request as @Smile4ever suggested, which was declined yesterday. The extension team suggested to file a feature request for what "my" extension should have done, but from the perspective of this question: It is and will not be possible to access the search bar from an extension.

crusy
  • 1,424
  • 2
  • 25
  • 54
1

For sake of completeness, here is the URL of the bug (feature request) for FF in order to offer functionality (probably optionable) to clear contents of search bar after a search is performed: Bugzilla 253331

bensiu
  • 24,660
  • 56
  • 77
  • 117
0

It appears that the search bar has been deliberately removed from Fire Fox Quantum and the address bar doubles as a search bar. So from now on use the address bar to type in your search. You will notice that when no web address is typed into the address bar. The address bar, By Default, has text in it that reads. SEARCH OR ENTER ADDRESS,

  • It's not, it's just hidden by default (and don't get me started on the usefulness of that): Preferences -> Search -> Add search bar in toolbar – crusy Nov 05 '18 at 08:19