- Thunderbird-Version: 68.1.0 rc2
- Betriebssystem + Version: Windows 7 Pro
Ich habe bisher nachfolgend aufgeführtes Script genutzt, um TB schnell neu starten zu können.
JavaScript
<?xml version="1.0"?>
<?xml-stylesheet href="data:text/css,
@namespace%20url('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul');
@namespace%20html%20url('http://www.w3.org/1999/xhtml');
%23restartfirefox-button {
list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC60lEQVQ4jXWSWUyTURCFDxQFqpQ1hkokQiiE6AuGuqEkxgWDiMpiEBEBAzTugEBA3BHQCBgVFBEBUXFFKIsasdi0QGtrcSMSsVWkQUOMr74Yjw/93VDPy9ybme/MzM0F/i0fzE8q9M88djVgW/kt++i8SsB12X9q/5DILSa7JaFZz9KBcRbprMzRvucurZXRnWZKd575CLiF/A8Wz95z7lPFs3Ee1I2yQPueWep3VKjeMuWBhQn3zIztMnPWWQ3hK18tMKE/6RmpxYMnn4/zkADnaEa4XTvG1J5RJnW/49rON1ypHObSttcMrlbRI+OwTqwoOy8M7pWYrrLyiN4G79BY6b/79AhC12dBFpHqvGF/i7zRyLCWIc6sG6Ck+jFFNUYi9eC5XwvMXKwI2Vf/ZcujMU6Nze3+a0FP/xgUPSCOa4lTfUTtY9pnHK4FgsOT4bco+Weha1A8AMkE3Bebyy04obPBNf10uGSgeEdxHbAkrXDvk8+UF1/5ar9CUfoP2Ca/0DiklT3FqR46NBrofs1Ij6ySBiA8Jb9A94Hbet4yQ22lvOohPbeUKSH2mjPBwk6IwU6ZRVelZ9voU1TeBIQl52b1jjGt28LE+2ZGdZgpic9VAnCcYOBkt2lPKyZNmifcJzvKgpcDCzfmKDRWJt4zM7brDSO7LBTF71P91X1rqUlyfYDTb+jpk19qgkQis6XmbdidrB7jmi4LI9uHGXZ7iDjQS2yv/4aU4lakl7TbHWmmS/MTSm8aGNRh5Fz1S3otj1LYDOZE57nEZde6p594uaLTwhk1JqJEQ1T0EtX9RJ2eUy7r6X3TwMB2I+U9LxiYf8j4+3guQpR4KCpGp1QNEOW9xJk+4oKO4iY9vW8YKFMaGaoeZGDh0VcAnAE4/HhYEQAxAC8AUiyIqUHuRaLBRHGzid53nlJ29xkDKhu+eUZEnQQwTagVCyawEw7Owh/wAOAJ0eR1juGrcpyXRGYDWA3AXchJfp/gOw9GYE6MbzLWAAAAAElFTkSuQmCC);
}
" type="text/css"?>
<!DOCTYPE overlay [
]>
<overlay id="restartOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript"><![CDATA[
var ToolRstartMod = {
//SAVE_SESSION_RESTART_VERSION: "0.0.2",
init: function() {
if (document.getElementById("Restart_Firefox_withDelDevCache")) return;
var optionsitem, menuitem, menupopup;
var UI = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"].
createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
UI.charset = "UTF-8";
var gPref = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefBranch);
try{
if (!gPref.getBoolPref("browser.sessionstore.enabled")&&gPref.getBoolPref("extensions.tabmix.sessions.manager")){
var button = document.getElementById("btn_sessionmanager");
var label = "Neustart";
//try {label =UI.ConvertToUnicode(label)} catch(e){}
if (button){
//button.setAttribute("disabled",false); //Fix With Rewindfowerd.xpi
menuitem = document.createElement("menuitem");
menuitem.setAttribute("id", "Restart_Firefox0__withDelDevCache");
menuitem.setAttribute("class", "menuitem-iconic");
menuitem.setAttribute("label", label);
menuitem.setAttribute("image", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6%2BR8AAAABGdBTUEAALGPC%2FxhBQAAAkVJREFUeJxVks1Lk3EAxz%2B%2FZ79ne575tk2ntjlsCnaY1aGC7hYWVPRyiA7RX1CEEdRp8xAFRnQI6tClSx0sCBEi8FDRC4ZpSaIpvsSWm07ndC8%2B255nT4cw6nv6Hj6f20fwz26%2FS3eXy5WB6JIRomSCEFwL13G8Uxs80uXp3%2BHEzrn8ajm2lrOjXodNq0eljMC0bMySxdt0hX1u5eGtk4GnrTWO92LJtrUHr1dujK2Uo6c6NHRd4hA2DiBv2hiWTblcZSJpcrTVkT1%2FoPGMHBlNhzdzVvREWEPTHHR5VPbu0tFVhfV8hYnUNlIIGnWTgW85T3PN2iOZL1bvGaaFpmm0uCX7m1QwDBSh0u51EmhQsW14NpnlsN%2FFuY%2BZihycy4Z7QnVkKzaudJ7HMym%2Bb5o0WyZXettoD%2FkAWEgZrFZs%2FIaFzG0VzaThxue26d1dS%2BfBJsyq4PnXddJlBT1jYCsKqRKMFIBiCWnlCnIlV8%2B2W0d1VHErZTbyJXQqXP1Swl%2FN0O2RTKo6%2FnpIFw0pTwe0xZeJ7B5PXQ3xdAGRqeDz6fR0KBwKCkBh7JfFjNQhvgWbhUWZTBb6WnIcK2byPFktkljY5GLEQdDvRFEUfmbhkzeE2iDZmE6SHl3uE%2FdfzLmG3szfnMUVTQSbweWEqkmbLgh7XASCXpBOpj8vMvlhNoa%2FeudvEZFLQzHTqUd%2FtPqgpQF%2FUy2RWgm5bZLTKQrj8Vhi%2BGz%2Ffxn9EYcjdW777vy22oYqAIHLKMUT4%2FnrTF2Y2uF%2BA5XB81eiCxQGAAAAAElFTkSuQmCC");
menuitem.setAttribute("onclick", "ToolRstartMod.SaveRestart(event,0);");
optionsitem = document.getElementById("btn-sm-settings");
optionsitem.parentNode.insertBefore(menuitem, optionsitem);
}
menuitem = document.createElement("menuitem");
menuitem.setAttribute("id", "Restart_Firefox1__withDelDevCache");
menuitem.setAttribute("label", label);
menuitem.setAttribute("onclick", "ToolRstartMod.SaveRestart(event,0);");
optionsitem = document.getElementById("menu_FileQuitItem");
optionsitem.parentNode.insertBefore(menuitem, optionsitem);
}
}catch(e){}
label = "Neustart";
//try {label =UI.ConvertToUnicode(label)} catch(e){}
menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", label);
menuitem.setAttribute("accesskey", "R");
menuitem.setAttribute("onclick", "ToolRstartMod.restartApp(event);");
optionsitem = document.getElementById("menu_FileQuitItem");
optionsitem.parentNode.insertBefore(menuitem, optionsitem);
menuitem.setAttribute("id", "Restart_Firefox");
optionsitem = document.getElementById("appmenu_quit") || document.getElementById("appmenu-quit");
if (optionsitem) {
menuitem = optionsitem.parentNode.insertBefore(menuitem.cloneNode(true), optionsitem);
menuitem.setAttribute("id", "Restart_Firefox2");
}
dump("Initialized addRestartButtons");
},
SaveRestart: function(e,f) {
e.stopPropagation();
if (f==0) {
SessionManager.sessionUtil('save', 'allwindows');
}
ToolRstartMod.restartApp(e,f);
},
//sessionsaver_.2-0.2.1.031-fx+mz.xpi??
restartApp: function(e,f) {
if (e.button !=0 || f==1) {
let xRE = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime);
xRE.invalidateCachesOnRestart();
}
const nsIAppStartup = Components.interfaces.nsIAppStartup;
// Notify all windows that an application quit has been requested.
var os = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
var cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"]
.createInstance(Components.interfaces.nsISupportsPRBool);
os.notifyObservers(cancelQuit, "quit-application-requested", null);
// Something aborted the quit process.
if (cancelQuit.data)
return;
// Notify all windows that an application quit has been granted.
os.notifyObservers(null, "quit-application-granted", null);
// Enumerate all windows and call shutdown handlers
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var windows = wm.getEnumerator(null);
var win;
while (windows.hasMoreElements()) {
win = windows.getNext();
if (("tryToClose" in win) && !win.tryToClose())
return;
}
Components.classes["@mozilla.org/toolkit/app-startup;1"].getService(nsIAppStartup)
.quit(nsIAppStartup.eRestart | nsIAppStartup.eAttemptQuit);
}
}
ToolRstartMod.init();
]]></script>
<toolbar id="tabbar-toolbar">
<toolbarbutton id="restartfirefox-button" class="toolbarbutton-1"
onclick="ToolRstartMod.restartApp(event);" tooltiptext="Neustart (mit Rechts- und Mittelklick wird userChrome.js-Cache geleert)"
insertafter="calendar-tab-button"
</toolbar>
</overlay>
Alles anzeigen
Mit der Version TB 68.1.0rc2 funktioniert dies leider nicht mehr.
Gibt es eine Möglichkeit dieses Script umzustricken oder ein anderes funktionierendes mit gleicher Funktion?
BTW: Gibt es eine Sammlung von Codes oder Scripten für TB, z.B. auf GitHub oder anderswo?