mirror of
https://github.com/moparisthebest/FireTray
synced 2025-01-08 12:08:05 -05:00
cleaning
This commit is contained in:
parent
0bdf8a03a0
commit
b49dac77db
@ -102,7 +102,7 @@ var firetrayChrome = { // each new window gets a new firetrayChrome !
|
|||||||
replaceCommand: function(eltId, func) {
|
replaceCommand: function(eltId, func) {
|
||||||
let elt = document.getElementById(eltId);
|
let elt = document.getElementById(eltId);
|
||||||
if (!elt) {
|
if (!elt) {
|
||||||
firetray_log.info("Element '"+eltId+"' not found. Command not replaced.");
|
firetray_log.debug("Element '"+eltId+"' not found. Command not replaced.");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -502,23 +502,21 @@ firetray.Handler = {
|
|||||||
branch: "mail.biff.", pref: "show_tray_icon", bak:null}
|
branch: "mail.biff.", pref: "show_tray_icon", bak:null}
|
||||||
],
|
],
|
||||||
disablePrefsTmp: function() {
|
disablePrefsTmp: function() {
|
||||||
for (let i=0, len=this.prefsDisable.length; i<len; ++i) {
|
this.prefsDisable.forEach(function(pref){
|
||||||
let pref = this.prefsDisable[i];
|
if (!pref.cond()) return;
|
||||||
if (!pref.cond()) continue;
|
|
||||||
let branch = Services.prefs.getBranch(pref.branch);
|
let branch = Services.prefs.getBranch(pref.branch);
|
||||||
pref.bak = branch.getBoolPref(pref.pref);
|
pref.bak = branch.getBoolPref(pref.pref);
|
||||||
log.debug(pref.pref+" saved. was: "+pref.bak);
|
log.warn(pref.pref+" saved. was: "+pref.bak);
|
||||||
branch.setBoolPref(pref.pref, false);
|
branch.setBoolPref(pref.pref, false);
|
||||||
}
|
});
|
||||||
},
|
},
|
||||||
restorePrefsTmp: function() {
|
restorePrefsTmp: function() {
|
||||||
for (let i=0, len=this.prefsDisable.length; i<len; ++i) {
|
this.prefsDisable.forEach(function(pref){
|
||||||
let pref = this.prefsDisable[i];
|
if (!pref.cond() || !pref.bak) return;
|
||||||
if (!pref.cond() || !pref.bak) continue;
|
|
||||||
let branch = Services.prefs.getBranch(pref.branch);
|
let branch = Services.prefs.getBranch(pref.branch);
|
||||||
branch.setBoolPref(pref.pref, pref.bak);
|
branch.setBoolPref(pref.pref, pref.bak);
|
||||||
log.debug(pref.pref+" restored to: "+pref.bak);
|
log.debug(pref.pref+" restored to: "+pref.bak);
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // firetray.Handler
|
}; // firetray.Handler
|
||||||
|
Loading…
Reference in New Issue
Block a user