This is just some static backup of the original site, don't expect every link to work!

Ignore:
Timestamp:
Nov 3, 2014, 12:35:40 PM (8 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
7204cb
Parents:
3c9c29
Message:

code formatting (no code changes)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/plugins/signatureSwitch.js

    r3c9c29 r509348  
    2525var EXPORTED_SYMBOLS = ["signatureSwitch"]
    2626
    27 const {classes: Cc, interfaces: Ci, utils: Cu, results : Cr} = Components;
     27const {
     28  classes: Cc,
     29  interfaces: Ci,
     30  utils: Cu,
     31  results: Cr
     32} = Components;
    2833Cu.import("resource://gre/modules/AddonManager.jsm");
    2934Cu.import("resource://v_identity/vI_prefs.js");
     
    3338function signatureSwitch(existingIdentity) {
    3439  // 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
    3745  let signatureWindow = Cc["@mozilla.org/appshell/window-mediator;1"]
    38       .getService(Ci.nsIWindowMediator)
    39       .getMostRecentWindow(null);
     46    .getService(Ci.nsIWindowMediator)
     47    .getMostRecentWindow(null);
    4048
    4149  if (!existingIdentity) {
    4250    Log.debug("signatureSwitch hide/remove signatures");
    43    
     51
    4452    // code to hide the text signature
    4553    if (signatureSwitchInstalled && vIprefs.get("hide_signature") && signatureWindow.ss_signature && signatureWindow.ss_signature.length == 0) {
     
    4755      signatureWindow.ss_main.signatureSwitch()
    4856    }
    49    
     57
    5058    // code to hide the sMime signature
    5159    if (vIprefs.get("hide_sMime_messageSignature")) {
     
    7785      }
    7886    }
    79   }
    80   else if (signatureSwitchInstalled) {
     87  } else if (signatureSwitchInstalled) {
    8188    Log.debug("signatureSwitch restore signature");
    8289    // code to show the text signature
     
    9198let signatureSwitchInstalled = false;
    9299// check for signature_switch extension
    93 AddonManager.getAddonByID("{2ab1b709-ba03-4361-abf9-c50b964ff75d}", function(addon) {
     100AddonManager.getAddonByID("{2ab1b709-ba03-4361-abf9-c50b964ff75d}", function (addon) {
    94101  signatureSwitchInstalled = (addon && !addon.userDisabled && !addon.appDisable);
    95102  if (signatureSwitchInstalled)
     
    97104  else
    98105    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.