Add an Add-ons shortcut in about:preferences

This commit is contained in:
ownedbywuigi 2026-04-02 20:22:05 +01:00
commit ea3e76e55c
4 changed files with 35 additions and 2 deletions

View file

@ -193,6 +193,18 @@ function helpButtonCommand() {
openHelpLink(helpTopic);
}
function openAddonsSidebarLink(event) {
event.preventDefault();
event.stopPropagation();
if (window.top && typeof window.top.BrowserOpenAddonsMgr == "function") {
window.top.BrowserOpenAddonsMgr();
return;
}
openUILinkIn("about:addons", "tab");
}
function friendlyPrefCategoryNameToInternalName(aName) {
if (aName.startsWith("pane"))
return aName;

View file

@ -87,7 +87,8 @@
<hbox flex="1">
<!-- category list -->
<richlistbox id="categories">
<vbox id="preferences-sidebar">
<richlistbox id="categories" flex="1">
<richlistitem id="category-general"
class="category"
value="paneGeneral"
@ -176,6 +177,13 @@
<label class="category-name" flex="1">&paneAdvanced.title;</label>
</richlistitem>
</richlistbox>
<hbox id="preferences-sidebar-footer" align="center">
<label id="sidebar-open-addons"
class="text-link"
value="&openAddonsSidebar.label;"
onclick="openAddonsSidebarLink(event);"/>
</hbox>
</vbox>
<keyset>
<!-- Disable the findbar because it doesn't work properly.