- Firefox-Version
- 143.0
- Betriebssystem
- win 11
Ich hab diesen Code für einen "about-Button":
JavaScript
// 20_dialog-button.uc.js
//
// 250610: Button für About-Dialog by harff182 Version 1.0
//
// 250610: Nachfrage mit Lösung durch Sören:
// https://www.camp-firefox.de/forum/thema/139470/?postID=1273657#post1273657
// 250611: Version 1.1: addEventListener
(function()
{
try
{
ChromeUtils.importESModule("resource:///modules/CustomizableUI.sys.mjs");
CustomizableUI.createWidget(
{
id: "aboutname",
defaultArea: CustomizableUI.AREA_NAVBAR,
removable: true,
label: "aboutname",
tooltiptext: "Firefox-Dialog",
onCreated: function(aNode)
{
// "currentProfileDirectory"-Lösung:
let currentProfileDirectory = Services.dirsvc.get("ProfD", Ci.nsIFile).path.replace(/\\/g, "/");
let aboutname_icon = 'url("file:///' + currentProfileDirectory + '/chrome/icons/firefox_21865_16.jpg")';
aNode.style.listStyleImage = aboutname_icon;
return aNode;
}
});
document.getElementById('aboutname').addEventListener( "click", onClick );
function onClick(event)
{
openAboutDialog(event);
}
}
catch (e)
{
Components.utils.reportError(e);
};
})();
Alles anzeigen
Mit dem Update auf 143.0 isser weg
Wie bekomme ich ihn wieder?