Bug 1160076 - Hide the in-content preferences Search pane when browser.search.showOneOffButtons is false, r=Gijs.

This commit is contained in:
Florian Quèze 2015-05-05 15:58:58 +02:00
parent 648bd5431e
commit d7a0af2f06

View File

@ -10,19 +10,21 @@ XPCOMUtils.defineLazyModuleGetter(this, "Task",
const ENGINE_FLAVOR = "text/x-moz-search-engine";
document.addEventListener("Initialized", () => {
if (Services.prefs.getBoolPref("browser.search.showOneOffButtons"))
return;
document.getElementById("category-search").hidden = true;
if (document.location.hash == "#search")
document.location.hash = "";
});
var gEngineView = null;
var gSearchPane = {
init: function ()
{
if (!Services.prefs.getBoolPref("browser.search.showOneOffButtons")) {
document.getElementById("category-search").hidden = true;
if (document.location.hash == "#search")
document.location.hash = "";
return;
}
gEngineView = new EngineView(new EngineStore());
document.getElementById("engineList").view = gEngineView;
this.buildDefaultEngineDropDown();