Skip to content

Commit

Permalink
Really new about:config button
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedor committed Oct 16, 2023
1 parent a3feb11 commit 9eceb46
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions browser/components/customizableui/CustomizableUI.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ var CustomizableUIInternal = {
"fullscreen-button",
"find-button",
"preferences-button",
"preferencesA-button",
"add-ons-button",
"sync-button",
];
Expand Down
12 changes: 10 additions & 2 deletions browser/components/customizableui/CustomizableWidgets.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,8 @@ if (Services.prefs.getBoolPref("identity.fxaccounts.enabled")) {
let preferencesButton = {
id: "preferences-button",
onCommand(aEvent) {
let win = Services.wm.getMostRecentWindow("navigator:browser");
win.openTrustedLinkIn("about:config", "tab");
let win = aEvent.target.ownerGlobal;
win.openPreferences(undefined);
},
};
if (AppConstants.platform == "win") {
Expand All @@ -873,6 +873,14 @@ if (AppConstants.platform == "win") {
}
CustomizableWidgets.push(preferencesButton);

CustomizableWidgets.push({
id: "preferencesA-button",
onCommand(e) {
let win = e.target.ownerGlobal;
win.openTrustedLinkIn("about:config", "tab");
},
});

if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) {
CustomizableWidgets.push({
id: "panic-button",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ preferences-button.labelWin = Options
# LOCALIZATION NOTE (preferences-button.tooltipWin): Windows-only tooltip for Options
preferences-button.tooltipWin2 = Open options

preferencesA-button.label = about:config
preferencesA-button.tooltiptext2 = Open about:config

zoom-controls.label = Zoom Controls
zoom-controls.tooltiptext2 = Zoom controls

Expand Down
4 changes: 4 additions & 0 deletions browser/themes/shared/toolbarbutton-icons.inc.css
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ toolbar[brighttext] {
list-style-image: url("chrome://browser/skin/settings.svg");
}

#preferencesA-button {
list-style-image: url("chrome://browser/skin/settings.svg");
}

#PanelUI-menu-button {
list-style-image: url("chrome://browser/skin/menu.svg");
}
Expand Down

0 comments on commit 9eceb46

Please sign in to comment.