Add preference to hide one-off search buttons and adjust CSS positioning

This commit is contained in:
mr. M
2025-03-02 17:03:58 +01:00
parent a500407dc3
commit 7b124f1dc2
4 changed files with 15 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/browser/components/search/SearchOneOffs.sys.mjs b/browser/components/search/SearchOneOffs.sys.mjs
index 6dcd68f7ec4da72f9510ac3c8ff1cecffbd70e92..f712b95d03be46f7d81bad4113f533f0515a92b9 100644
--- a/browser/components/search/SearchOneOffs.sys.mjs
+++ b/browser/components/search/SearchOneOffs.sys.mjs
@@ -446,7 +446,7 @@ export class SearchOneOffs {
// For the search-bar, always show the one-off buttons where there is an
// option to add an engine.
let addEngineNeeded = isSearchBar && addEngines.length;
- let hideOneOffs = (await this.willHide()) && !addEngineNeeded;
+ let hideOneOffs = (await this.willHide()) && !addEngineNeeded || Services.prefs.getBoolPref("zen.urlbar.hide-one-offs");
// The _engineInfo cache is used by more consumers, thus it is not a good
// representation of whether this method already updated the one-off buttons