Ich kann dir damit aushelfen.
JavaScript
// Restart.uc.js
// linke Maus Neustart
// rechte Maus Neustart mit Löschüng des Start-Caches
// Mittelklick öffnet about:config
(function() {
if (!window.gBrowser)
return;
CustomizableUI.createWidget({
id: 'buttonNeustart',
defaultArea: CustomizableUI.AREA_NAVBAR,
label: 'Restart Firefox',
tooltiptext: 'Startet Firefox neu',
onCreated: (button) => {
button.style.listStyleImage = 'url("file:///C:/FoxIcons2/neustarten.png")';
button.addEventListener('click', () => {
if (event.button == 0) {
Services.startup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit);
}
if (event.button == 2) {
Services.appinfo.invalidateCachesOnRestart();
Services.startup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit);
}
if (event.button == 1) {
openTrustedLinkIn("about:config", "tab");
}
})
}
});
})();
Alles anzeigen
