mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
Bug 1160076 - Hide the in-content preferences Search pane when browser.search.showOneOffButtons is false, r=Gijs.
This commit is contained in:
parent
648bd5431e
commit
d7a0af2f06
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user