Versuch mal diese Version:
JavaScript
//RestartThunderbird.uc.js
"use strict";
(function() {
if (location != 'chrome://messenger/content/messenger.xhtml') return;
// toolbox
var toolbarbutton = document.createXULElement('toolbarbutton');
var props = {
id: 'restartthunderbird-toolbar',
label: '',
tooltiptext: 'Neustart (mit Rechts- und Mittelklick wird userChrome.js-Cache geleert)',
style: 'list-style-image: url("file:///E:/ICONS/FF/Neustart.png")',
class: 'toolbarbutton-1',
onclick: 'if (event.button == 0) { \
Services.startup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit); \
}; \
if (event.button == 1 || event.button == 2) { \
Services.appinfo.invalidateCachesOnRestart(); \
Services.startup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit); \
};'
};
for (var p in props) toolbarbutton.setAttribute(p, props[p]);
var position = document.getElementById('unifiedToolbarContent');
position.parentNode.insertBefore(toolbarbutton, position.nextSibling);
// popup
var menuitem = document.createXULElement('menuitem');
var props = {
id: 'restartthunderbird-popup',
label: 'Neustart',
tooltiptext: 'Neustart (mit Rechts- und Mittelklick wird userChrome.js-Cache geleert)',
style: 'list-style-image: url("file:///E:/ICONS/FF/Neustart.png")',
class: 'menuitem-iconic',
onclick: 'if (event.button == 0) { \
Services.startup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit); \
}; \
if (event.button == 1 || event.button == 2) { \
Services.appinfo.invalidateCachesOnRestart(); \
Services.startup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit); \
};'
};
for (var p in props) menuitem.setAttribute(p, props[p]);
var popup = document.getElementById('menu_FilePopup')
popup.insertBefore(menuitem, document.getElementById('menu_FileQuitItem'));
})();
Alles anzeigen
In Zeile 14 mußt du den Pfad zur Grafik anpassen.