Changeset 509348 for modules/plugins/signatureSwitch.js
- Timestamp:
- Nov 3, 2014, 12:35:40 PM (8 years ago)
- Branches:
- ng_0.9
- Children:
- 7204cb
- Parents:
- 3c9c29
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/plugins/signatureSwitch.js
r3c9c29 r509348 25 25 var EXPORTED_SYMBOLS = ["signatureSwitch"] 26 26 27 const {classes: Cc, interfaces: Ci, utils: Cu, results : Cr} = Components; 27 const { 28 classes: Cc, 29 interfaces: Ci, 30 utils: Cu, 31 results: Cr 32 } = Components; 28 33 Cu.import("resource://gre/modules/AddonManager.jsm"); 29 34 Cu.import("resource://v_identity/vI_prefs.js"); … … 33 38 function signatureSwitch(existingIdentity) { 34 39 // always try to initialize Security/Enigmail-Options 35 try { setSecuritySettings(1); enigSetMenuSettings(''); } catch(vErr) { }; 36 40 try { 41 setSecuritySettings(1); 42 enigSetMenuSettings(''); 43 } catch (vErr) {}; 44 37 45 let signatureWindow = Cc["@mozilla.org/appshell/window-mediator;1"] 38 39 46 .getService(Ci.nsIWindowMediator) 47 .getMostRecentWindow(null); 40 48 41 49 if (!existingIdentity) { 42 50 Log.debug("signatureSwitch hide/remove signatures"); 43 51 44 52 // code to hide the text signature 45 53 if (signatureSwitchInstalled && vIprefs.get("hide_signature") && signatureWindow.ss_signature && signatureWindow.ss_signature.length == 0) { … … 47 55 signatureWindow.ss_main.signatureSwitch() 48 56 } 49 57 50 58 // code to hide the sMime signature 51 59 if (vIprefs.get("hide_sMime_messageSignature")) { … … 77 85 } 78 86 } 79 } 80 else if (signatureSwitchInstalled) { 87 } else if (signatureSwitchInstalled) { 81 88 Log.debug("signatureSwitch restore signature"); 82 89 // code to show the text signature … … 91 98 let signatureSwitchInstalled = false; 92 99 // check for signature_switch extension 93 AddonManager.getAddonByID("{2ab1b709-ba03-4361-abf9-c50b964ff75d}", function (addon) {100 AddonManager.getAddonByID("{2ab1b709-ba03-4361-abf9-c50b964ff75d}", function (addon) { 94 101 signatureSwitchInstalled = (addon && !addon.userDisabled && !addon.appDisable); 95 102 if (signatureSwitchInstalled) … … 97 104 else 98 105 Log.debug("virtualIdentity is ready for signatureSwitch, but you don't use it"); 99 106 });
Note: See TracChangeset
for help on using the changeset viewer.