Capture the searchbox's contents

I am updating my extension that adds search buttons to the toolbar so that you do not need to keep first clicking on the search box for the search options to show up, but there is no function that I have seen in the new API to capture the searchbox’s contents. How do I grab its contents in the new api? The separate search box is the main reason I use Firefox – I don’t understand why people like to type same content over and over again, every time they want to do the same search in a different engine.
Here is my old code - will this still work in the new API? (Just beginning the redesign)

       //this function fires when a search button is clicked
	function returnURL(tabURL) {
		return function () {
			tabs.activeTab.url = tabURL + getMostRecentBrowserWindow().document.getElementById("searchbar").value;
		};
	}

I don’t think there is one. And since it is planned to remove the search box from the default layout (but keep it as an UI option), I don’t think one will be added. So to answer your final question: No.

But Firefox will add the capability to add custom iframe-based UI elements. You could implement your own search box with custom semantics.


I don’t understand why people like to type same content over and over again, every time they want to do the same search in a different engine.

Quite frankly, if you regularly need to consult more than one search engine, then your engines suck - or you don’t know how to use them. And to avoid typing stuff twice, there is the clipboard.

So these iFrames will be in the toolbar?

I agree that google, duck-duck-go and yahoo have their limitations (although I wouldn’t go so far as say they suck) … plus there is the SearchWP plugin. I would recommend having the default be have all the available features present and let people take the ones they don’t use away, rather than people needing find things (and new users not knowing about them).

At least that was the notion the last time I heard about it a couple of month ago.

That would be great - do you know if there is some place I can find out more about the details/progress in this endeavor?

There will be a bug on bugzilla, I don’t remember a number, though. You should search for WebExtension and toolbar.

Is this the one:
https://bugzilla.mozilla.org/show_bug.cgi?id=1215064&GoAheadAndLogIn=1 ?

Yep

(fill 20 char limit)