feat: add option to disable close button on tabs
(cherry picked from commit ff68d8fd9ff678e6cf7efb6d662728b223322ba4)
This commit is contained in:
@@ -32,6 +32,7 @@ pref("app.update.url.override", "", sticky); // Override URL for application upd
|
||||
// Defines browser behavior on startup and general UI settings.
|
||||
pref("browser.startup.page", 3); // 0=blank, 1=home, 2=last visited page, 3=resume previous session.
|
||||
pref("browser.privateTab.showNewTabButton", false); // Show new private tab button next to existing new tab buttons
|
||||
pref("browser.tabs.closeButtons", false); // Hide close button on tabs
|
||||
pref("browser.tabs.pinnedIconOnly", true); // Pinned tabs show only an icon, no text.
|
||||
pref("browser.tabs.warnOnClose", true); // Warn user when attempting to close multiple tabs.
|
||||
// Stores the state of toolbar customizations (e.g., button placements).
|
||||
|
||||
@@ -90,6 +90,15 @@ export const WaterfoxGlue = {
|
||||
lazy.BrowserUtils.registerOrUnregisterSheet(uri, !isEnabled);
|
||||
}
|
||||
);
|
||||
this.styleSheetChanges = lazy.PrefUtils.addObserver(
|
||||
"browser.tabs.closeButtons",
|
||||
() => {
|
||||
// Pref being true actually means we need to unload the sheet, so invert.
|
||||
const uri = "chrome://browser/skin/waterfox/general.css";
|
||||
lazy.BrowserUtils.unregisterStylesheet(uri);
|
||||
lazy.BrowserUtils.registerStylesheet(uri);
|
||||
}
|
||||
)
|
||||
},
|
||||
|
||||
async getChromeManifest(manifest) {
|
||||
|
||||
@@ -181,3 +181,9 @@
|
||||
#preferences-body .main-content {
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
|
||||
@supports -moz-bool-pref("browser.tabs.closeButtons") {
|
||||
.tab-close-button {
|
||||
display: none !important
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user