Bug 1515877 - Mass indentation corrections in mailnews/base; rs=white-space-only
authorGeoff Lankow <geoff@darktrojan.net>
Tue, 16 Apr 2019 12:48:27 +1200
changeset 26354 cbd032bfb562
parent 26353 d34239c5e7a0
child 26355 1b5861b5c09a
push id15798
push usergeoff@darktrojan.net
push dateTue, 16 Apr 2019 04:15:07 +0000
treeherdercomm-central@ffedede7fa10 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhite-space-only
bugs1515877
Bug 1515877 - Mass indentation corrections in mailnews/base; rs=white-space-only
mailnews/base/content/folderProps.js
mailnews/base/content/msgAccountCentral.js
mailnews/base/content/msgSynchronize.js
mailnews/base/prefs/content/AccountWizard.js
mailnews/base/prefs/content/accountUtils.js
mailnews/base/prefs/content/am-copies.js
mailnews/base/prefs/content/am-offline.js
mailnews/base/prefs/content/am-server.js
mailnews/base/prefs/content/aw-done.js
--- a/mailnews/base/content/folderProps.js
+++ b/mailnews/base/content/folderProps.js
@@ -10,86 +10,85 @@ var {Gloda} = ChromeUtils.import("resour
 var gMsgFolder;
 var gLockedPref = null;
 
 document.addEventListener("dialogaccept", folderPropsOKButton);
 
 // The folderPropsSink is the class that gets notified of an imap folder's properties
 
 var gFolderPropsSink = {
-    setFolderType(folderTypeString) {
-      var typeLabel = document.getElementById("folderType.text");
-      if (typeLabel) {
-        typeLabel.setAttribute("value", folderTypeString);
-      }
-      // get the element for the folder type label and set value on it.
-    },
+  setFolderType(folderTypeString) {
+    var typeLabel = document.getElementById("folderType.text");
+    if (typeLabel) {
+      typeLabel.setAttribute("value", folderTypeString);
+    }
+    // get the element for the folder type label and set value on it.
+  },
 
-    setFolderTypeDescription(folderDescription) {
-      var folderTypeLabel = document.getElementById("folderDescription.text");
-      if (folderTypeLabel)
-        folderTypeLabel.setAttribute("value", folderDescription);
-    },
+  setFolderTypeDescription(folderDescription) {
+    var folderTypeLabel = document.getElementById("folderDescription.text");
+    if (folderTypeLabel)
+      folderTypeLabel.setAttribute("value", folderDescription);
+  },
 
-    setFolderPermissions(folderPermissions) {
-      var permissionsLabel = document.getElementById("folderPermissions.text");
-      var descTextNode =  document.createTextNode(folderPermissions);
-      permissionsLabel.appendChild(descTextNode);
-    },
+  setFolderPermissions(folderPermissions) {
+    var permissionsLabel = document.getElementById("folderPermissions.text");
+    var descTextNode =  document.createTextNode(folderPermissions);
+    permissionsLabel.appendChild(descTextNode);
+  },
 
-    serverDoesntSupportACL() {
-      var typeLabel = document.getElementById("folderTypeLabel");
-      if (typeLabel)
-        typeLabel.setAttribute("hidden", "true");
-      var permissionsLabel = document.getElementById("permissionsDescLabel");
-      if (permissionsLabel)
-        permissionsLabel.setAttribute("hidden", "true");
-    },
+  serverDoesntSupportACL() {
+    var typeLabel = document.getElementById("folderTypeLabel");
+    if (typeLabel)
+      typeLabel.setAttribute("hidden", "true");
+    var permissionsLabel = document.getElementById("permissionsDescLabel");
+    if (permissionsLabel)
+      permissionsLabel.setAttribute("hidden", "true");
+  },
 
-    setQuotaStatus(folderQuotaStatus) {
-      var quotaStatusLabel = document.getElementById("folderQuotaStatus");
-      if (quotaStatusLabel)
-        quotaStatusLabel.setAttribute("value", folderQuotaStatus);
-    },
+  setQuotaStatus(folderQuotaStatus) {
+    var quotaStatusLabel = document.getElementById("folderQuotaStatus");
+    if (quotaStatusLabel)
+      quotaStatusLabel.setAttribute("value", folderQuotaStatus);
+  },
 
-    showQuotaData(showData) {
-      var quotaStatusLabel = document.getElementById("folderQuotaStatus");
-      var folderQuotaData = document.getElementById("folderQuotaData");
+  showQuotaData(showData) {
+    var quotaStatusLabel = document.getElementById("folderQuotaStatus");
+    var folderQuotaData = document.getElementById("folderQuotaData");
 
-      if (quotaStatusLabel && folderQuotaData) {
-        quotaStatusLabel.hidden = showData;
-        folderQuotaData.hidden = !showData;
-      }
-    },
+    if (quotaStatusLabel && folderQuotaData) {
+      quotaStatusLabel.hidden = showData;
+      folderQuotaData.hidden = !showData;
+    }
+  },
 
-    setQuotaData(root, usedKB, maxKB) {
-      var quotaRoot = document.getElementById("quotaRoot");
-      if (quotaRoot)
-        quotaRoot.setAttribute("value", '"' + root + '"');
+  setQuotaData(root, usedKB, maxKB) {
+    var quotaRoot = document.getElementById("quotaRoot");
+    if (quotaRoot)
+      quotaRoot.setAttribute("value", '"' + root + '"');
 
-      var percentage = (maxKB != 0) ? Math.round(usedKB / maxKB * 100) : 0;
+    var percentage = (maxKB != 0) ? Math.round(usedKB / maxKB * 100) : 0;
 
-      var quotaPercentageBar = document.getElementById("quotaPercentageBar");
-      if (quotaPercentageBar)
-        quotaPercentageBar.setAttribute("value", percentage);
+    var quotaPercentageBar = document.getElementById("quotaPercentageBar");
+    if (quotaPercentageBar)
+      quotaPercentageBar.setAttribute("value", percentage);
 
-      var bundle = document.getElementById("bundle_messenger");
-      if (bundle) {
-        var usedFreeCaption = bundle.getFormattedString("quotaUsedFree", [usedKB, maxKB], 2);
-        var quotaCaption = document.getElementById("quotaUsedFree");
-        if (quotaCaption)
-          quotaCaption.setAttribute("value", usedFreeCaption);
+    var bundle = document.getElementById("bundle_messenger");
+    if (bundle) {
+      var usedFreeCaption = bundle.getFormattedString("quotaUsedFree", [usedKB, maxKB], 2);
+      var quotaCaption = document.getElementById("quotaUsedFree");
+      if (quotaCaption)
+        quotaCaption.setAttribute("value", usedFreeCaption);
 
-        var percentUsedCaption = bundle.getFormattedString("quotaPercentUsed", [percentage], 1);
-        var percentUsed = document.getElementById("quotaPercentUsed");
-        if (percentUsed)
-          percentUsed.setAttribute("value", percentUsedCaption);
-      }
-    },
-
+      var percentUsedCaption = bundle.getFormattedString("quotaPercentUsed", [percentage], 1);
+      var percentUsed = document.getElementById("quotaPercentUsed");
+      if (percentUsed)
+        percentUsed.setAttribute("value", percentUsedCaption);
+    }
+  },
 };
 
 function doEnabling() {
   var nameTextbox = document.getElementById("name");
   document.documentElement.getButton("accept").disabled = !nameTextbox.value;
 }
 
 function folderPropsOKButton(event) {
@@ -165,18 +164,18 @@ function folderPropsOnLoad() {
 
   if (window.arguments[0].name) {
     // Initialize name textbox with the given name and remember this
     // value so we can tell whether the folder needs to be renamed
     // when the dialog is accepted.
     var nameTextbox = document.getElementById("name");
     nameTextbox.value = window.arguments[0].name;
 
-//  name.setSelectionRange(0,-1);
-//  name.focusTextField();
+    // name.setSelectionRange(0,-1);
+    // name.focusTextField();
   }
 
   const serverType = window.arguments[0].serverType;
 
   // Do this first, because of gloda we may want to override some of the hidden
   // statuses.
   hideShowControls(serverType);
 
@@ -254,17 +253,17 @@ function folderPropsOnLoad() {
   if (numberOfMsgs >= 0)
     document.getElementById("numberOfMessages").value = numberOfMsgs;
 
   try {
     let sizeOnDisk = Cc["@mozilla.org/messenger;1"]
                        .createInstance(Ci.nsIMessenger)
                        .formatFileSize(gMsgFolder.sizeOnDisk, true);
     document.getElementById("sizeOnDisk").value = sizeOnDisk;
-  } catch (e) { }
+  } catch (e) {}
 
   // select the initial tab
   if (window.arguments[0].tabID) {
     try {
       document.getElementById("folderPropTabBox").selectedTab =
         document.getElementById(window.arguments[0].tabID);
     } catch (ex) {}
   }
--- a/mailnews/base/content/msgAccountCentral.js
+++ b/mailnews/base/content/msgAccountCentral.js
@@ -7,320 +7,319 @@
 /* import-globals-from ../prefs/content/AccountManager.js */
 /* import-globals-from ../prefs/content/accountUtils.js */
 
 var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var selectedServer = null;
 
 function OnInit() {
-    // Set the header for the page.
-    // Title contains the brand name of the application and the account
-    // type (mail/news) and the name of the account
-    try {
-        let msgFolder    = null;
-        let title;
+  // Set the header for the page.
+  // Title contains the brand name of the application and the account
+  // type (mail/news) and the name of the account
+  try {
+    let msgFolder    = null;
+    let title;
 
-        // Get the brand name
-        let brandName = document.getElementById("bundle_brand")
-                                .getString("brandShortName");
-        let messengerBundle = document.getElementById("bundle_messenger");
+    // Get the brand name
+    let brandName = document.getElementById("bundle_brand")
+                .getString("brandShortName");
+    let messengerBundle = document.getElementById("bundle_messenger");
 
-        selectedServer = GetSelectedServer();
-        if (selectedServer) {
-            // Get the account type
-            let serverType = selectedServer.type;
-            let acctType;
-            if (serverType == "nntp")
-                acctType = messengerBundle.getString("newsAcctType");
-            else if (serverType == "rss")
-                acctType = messengerBundle.getString("feedsAcctType");
-            else
-                acctType = messengerBundle.getString("mailAcctType");
+    selectedServer = GetSelectedServer();
+    if (selectedServer) {
+      // Get the account type
+      let serverType = selectedServer.type;
+      let acctType;
+      if (serverType == "nntp")
+        acctType = messengerBundle.getString("newsAcctType");
+      else if (serverType == "rss")
+        acctType = messengerBundle.getString("feedsAcctType");
+      else
+        acctType = messengerBundle.getString("mailAcctType");
 
-            // Get the account name
-            msgFolder = GetSelectedMsgFolder();
-            ArrangeAccountCentralItems(selectedServer, msgFolder);
+      // Get the account name
+      msgFolder = GetSelectedMsgFolder();
+      ArrangeAccountCentralItems(selectedServer, msgFolder);
 
-            let acctName = msgFolder.prettyName;
-            // Display and collapse items presented to the user based on account type
-            title = messengerBundle.getFormattedString("acctCentralTitleFormat",
-                                                       [brandName, acctType, acctName]);
-        } else {
-          // If there is no selectedServer, we are in a brand new profile with
-          // no accounts - show the create account rows.
-          title = brandName;
-          SetItemDisplay("AccountsHeader", true);
-          SetItemDisplay("CreateAccount", true);
-          SetItemDisplay("CreateAccounts", true);
-        }
+      let acctName = msgFolder.prettyName;
+      // Display and collapse items presented to the user based on account type
+      title = messengerBundle.getFormattedString("acctCentralTitleFormat",
+                             [brandName, acctType, acctName]);
+    } else {
+      // If there is no selectedServer, we are in a brand new profile with
+      // no accounts - show the create account rows.
+      title = brandName;
+      SetItemDisplay("AccountsHeader", true);
+      SetItemDisplay("CreateAccount", true);
+      SetItemDisplay("CreateAccounts", true);
+    }
 
-        // Set the title for the document
-        document.getElementById("AccountCentralTitle").setAttribute("value", title);
-    } catch (ex) {
-        Cu.reportError("Error getting selected account: " + ex + "\n");
-    }
+    // Set the title for the document
+    document.getElementById("AccountCentralTitle").setAttribute("value", title);
+  } catch (ex) {
+    Cu.reportError("Error getting selected account: " + ex + "\n");
+  }
 }
 
 // Show items in the AccountCentral page depending on the capabilities
 // of the given account
 /* eslint-disable complexity */
 function ArrangeAccountCentralItems(server, msgFolder) {
-    let exceptions = [];
-    let protocolInfo = null;
-    try {
-      protocolInfo = server.protocolInfo;
-    } catch (e) {
-      exceptions.push(e);
-    }
+  let exceptions = [];
+  let protocolInfo = null;
+  try {
+    protocolInfo = server.protocolInfo;
+  } catch (e) {
+    exceptions.push(e);
+  }
 
-    // Is this a RSS account?
-    let displayRssHeader = server && server.type == "rss";
+  // Is this a RSS account?
+  let displayRssHeader = server && server.type == "rss";
 
-    /* Email header and items : Begin */
+  /* Email header and items : Begin */
 
-    // Read Messages
-    let canGetMessages = false;
-    try {
-        canGetMessages = protocolInfo && protocolInfo.canGetMessages;
-        SetItemDisplay("ReadMessages", canGetMessages && !displayRssHeader);
-    } catch (e) { exceptions.push(e); }
+  // Read Messages
+  let canGetMessages = false;
+  try {
+    canGetMessages = protocolInfo && protocolInfo.canGetMessages;
+    SetItemDisplay("ReadMessages", canGetMessages && !displayRssHeader);
+  } catch (e) { exceptions.push(e); }
 
-    // Compose Messages link
-    let showComposeMsgLink = false;
-    try {
-        showComposeMsgLink = protocolInfo && protocolInfo.showComposeMsgLink;
-        SetItemDisplay("ComposeMessage", showComposeMsgLink);
-    } catch (e) { exceptions.push(e); }
+  // Compose Messages link
+  let showComposeMsgLink = false;
+  try {
+    showComposeMsgLink = protocolInfo && protocolInfo.showComposeMsgLink;
+    SetItemDisplay("ComposeMessage", showComposeMsgLink);
+  } catch (e) { exceptions.push(e); }
 
-    // Junk mail settings (false, until ready for prime time)
-    let canControlJunkEmail = false;
-    try {
-        canControlJunkEmail = false && protocolInfo &&
-                              protocolInfo.canGetIncomingMessages &&
-                              protocolInfo.canGetMessages;
-        SetItemDisplay("JunkSettingsMail", canControlJunkEmail);
-    } catch (e) { exceptions.push(e); }
+  // Junk mail settings (false, until ready for prime time)
+  let canControlJunkEmail = false;
+  try {
+    canControlJunkEmail = false && protocolInfo &&
+                protocolInfo.canGetIncomingMessages &&
+                protocolInfo.canGetMessages;
+    SetItemDisplay("JunkSettingsMail", canControlJunkEmail);
+  } catch (e) { exceptions.push(e); }
 
-    // Display Email header, only if any of the items are displayed
-    let displayEmailHeader = !displayRssHeader &&
-                             (canGetMessages || showComposeMsgLink ||
-                              canControlJunkEmail);
-    SetItemDisplay("EmailHeader", displayEmailHeader);
+  // Display Email header, only if any of the items are displayed
+  let displayEmailHeader = !displayRssHeader &&
+                           (canGetMessages || showComposeMsgLink || canControlJunkEmail);
+  SetItemDisplay("EmailHeader", displayEmailHeader);
 
-    /* Email header and items : End */
+  /* Email header and items : End */
 
-    /* News header and items : Begin */
+  /* News header and items : Begin */
 
-    // Subscribe to Newsgroups
-    let canSubscribe = false;
-    try {
-        canSubscribe = msgFolder && msgFolder.canSubscribe &&
-                       protocolInfo && !protocolInfo.canGetMessages;
-        SetItemDisplay("SubscribeNewsgroups", canSubscribe);
-    } catch (e) { exceptions.push(e); }
+  // Subscribe to Newsgroups
+  let canSubscribe = false;
+  try {
+    canSubscribe = msgFolder && msgFolder.canSubscribe &&
+             protocolInfo && !protocolInfo.canGetMessages;
+    SetItemDisplay("SubscribeNewsgroups", canSubscribe);
+  } catch (e) { exceptions.push(e); }
 
-    // Junk news settings (false, until ready for prime time)
-    let canControlJunkNews = false;
-    try {
-        canControlJunkNews = false && protocolInfo &&
-                             protocolInfo.canGetIncomingMessages &&
-                             !protocolInfo.canGetMessages;
-        SetItemDisplay("JunkSettingsNews", canControlJunkNews);
-    } catch (e) { exceptions.push(e); }
+  // Junk news settings (false, until ready for prime time)
+  let canControlJunkNews = false;
+  try {
+    canControlJunkNews = false && protocolInfo &&
+               protocolInfo.canGetIncomingMessages &&
+               !protocolInfo.canGetMessages;
+    SetItemDisplay("JunkSettingsNews", canControlJunkNews);
+  } catch (e) { exceptions.push(e); }
 
-    // Display News header, only if any of the items are displayed
-    let displayNewsHeader = canSubscribe || canControlJunkNews;
-    SetItemDisplay("NewsHeader", displayNewsHeader);
+  // Display News header, only if any of the items are displayed
+  let displayNewsHeader = canSubscribe || canControlJunkNews;
+  SetItemDisplay("NewsHeader", displayNewsHeader);
 
-    /* News header and items : End */
+  /* News header and items : End */
 
-    /* RSS header and items : Begin */
+  /* RSS header and items : Begin */
 
-    // Display RSS header, only if this is RSS account
-    SetItemDisplay("rssHeader", displayRssHeader);
+  // Display RSS header, only if this is RSS account
+  SetItemDisplay("rssHeader", displayRssHeader);
 
-    // Subscribe to RSS Feeds
-    SetItemDisplay("SubscribeRSS", displayRssHeader);
+  // Subscribe to RSS Feeds
+  SetItemDisplay("SubscribeRSS", displayRssHeader);
 
-    /* RSS header and items : End */
+  /* RSS header and items : End */
 
-    // If either of above sections exists, show section separators
-    SetItemDisplay("MessagesSection",
-                   displayNewsHeader || displayEmailHeader || displayRssHeader);
+  // If either of above sections exists, show section separators
+  SetItemDisplay("MessagesSection",
+                 displayNewsHeader || displayEmailHeader || displayRssHeader);
 
-    /* Accounts : Begin */
+  /* Accounts : Begin */
 
-    // Account Settings if a server is found
-    let canShowAccountSettings = server != null;
-    SetItemDisplay("AccountSettings", canShowAccountSettings);
+  // Account Settings if a server is found
+  let canShowAccountSettings = server != null;
+  SetItemDisplay("AccountSettings", canShowAccountSettings);
 
-    // Show New Mail Account Wizard if not prohibited by pref
-    let canShowCreateAccount = false;
-    try {
-        canShowCreateAccount = !Services.prefs
-          .prefIsLocked("mail.disable_new_account_addition");
-        SetItemDisplay("CreateAccount", canShowCreateAccount);
-        SetItemDisplay("CreateAccounts", canShowCreateAccount);
-    } catch (e) { exceptions.push(e); }
+  // Show New Mail Account Wizard if not prohibited by pref
+  let canShowCreateAccount = false;
+  try {
+    canShowCreateAccount = !Services.prefs
+      .prefIsLocked("mail.disable_new_account_addition");
+    SetItemDisplay("CreateAccount", canShowCreateAccount);
+    SetItemDisplay("CreateAccounts", canShowCreateAccount);
+  } catch (e) { exceptions.push(e); }
 
-    // Display Accounts header, only if any of the items are displayed
-    SetItemDisplay("AccountsHeader", canShowCreateAccount);
+  // Display Accounts header, only if any of the items are displayed
+  SetItemDisplay("AccountsHeader", canShowCreateAccount);
 
-    /* Accounts : End */
+  /* Accounts : End */
 
-    /* Advanced Features header and items : Begin */
+  /* Advanced Features header and items : Begin */
 
-    // Search Messages
-    let canSearchMessages = false;
-    try {
-        canSearchMessages = server && server.canSearchMessages;
-        SetItemDisplay("SearchMessages", canSearchMessages);
-    } catch (e) { exceptions.push(e); }
+  // Search Messages
+  let canSearchMessages = false;
+  try {
+    canSearchMessages = server && server.canSearchMessages;
+    SetItemDisplay("SearchMessages", canSearchMessages);
+  } catch (e) { exceptions.push(e); }
 
-    // Create Filters
-    let canHaveFilters = false;
-    try {
-        canHaveFilters = server && server.canHaveFilters;
-        SetItemDisplay("CreateFilters", canHaveFilters);
-    } catch (e) { exceptions.push(e); }
+  // Create Filters
+  let canHaveFilters = false;
+  try {
+    canHaveFilters = server && server.canHaveFilters;
+    SetItemDisplay("CreateFilters", canHaveFilters);
+  } catch (e) { exceptions.push(e); }
 
-    // Subscribe to IMAP Folders
-    let canSubscribeImapFolders = false;
-    try {
-        canSubscribeImapFolders = msgFolder && msgFolder.canSubscribe &&
-                                  protocolInfo && protocolInfo.canGetMessages;
-        SetItemDisplay("SubscribeImapFolders", canSubscribeImapFolders);
-    } catch (e) { exceptions.push(e); }
+  // Subscribe to IMAP Folders
+  let canSubscribeImapFolders = false;
+  try {
+    canSubscribeImapFolders = msgFolder && msgFolder.canSubscribe &&
+                  protocolInfo && protocolInfo.canGetMessages;
+    SetItemDisplay("SubscribeImapFolders", canSubscribeImapFolders);
+  } catch (e) { exceptions.push(e); }
 
-    // Offline Settings
-    let supportsOffline = false;
-    try {
-        supportsOffline = server && server.offlineSupportLevel != 0;
-        SetItemDisplay("OfflineSettings", supportsOffline);
-    } catch (e) { exceptions.push(e); }
+  // Offline Settings
+  let supportsOffline = false;
+  try {
+    supportsOffline = server && server.offlineSupportLevel != 0;
+    SetItemDisplay("OfflineSettings", supportsOffline);
+  } catch (e) { exceptions.push(e); }
 
-    // Display Adv Features header, only if any of the items are displayed
-    let displayAdvFeatures = canSearchMessages || canHaveFilters ||
-                             canSubscribeImapFolders || supportsOffline;
-    SetItemDisplay("AdvancedFeaturesHeader", displayAdvFeatures);
+  // Display Adv Features header, only if any of the items are displayed
+  let displayAdvFeatures = canSearchMessages || canHaveFilters ||
+                           canSubscribeImapFolders || supportsOffline;
+  SetItemDisplay("AdvancedFeaturesHeader", displayAdvFeatures);
 
-    /* Advanced Featuers header and items : End */
+  /* Advanced Featuers header and items : End */
 
-    // If either of above features exist, show section separators
-    SetItemDisplay("AccountsSection", displayAdvFeatures);
+  // If either of above features exist, show section separators
+  SetItemDisplay("AccountsSection", displayAdvFeatures);
 
-    while (exceptions.length) {
-        Cu.reportError("Error in setting AccountCentral Items: "
-            + exceptions.pop() + "\n");
-    }
+  while (exceptions.length) {
+    Cu.reportError("Error in setting AccountCentral Items: "
+      + exceptions.pop() + "\n");
+  }
 }
 /* eslint-enable complexity */
 
 // Show the item if the item feature is supported
 function SetItemDisplay(elemId, displayThisItem) {
-    if (displayThisItem) {
-        let elem = document.getElementById(elemId);
-        if (elem)
-            elem.setAttribute("collapsed", false);
+  if (displayThisItem) {
+    let elem = document.getElementById(elemId);
+    if (elem)
+      elem.setAttribute("collapsed", false);
 
-        let elemSpacer = document.getElementById(elemId + ".spacer");
-        if (elemSpacer)
-            elemSpacer.setAttribute("collapsed", false);
-    }
+    let elemSpacer = document.getElementById(elemId + ".spacer");
+    if (elemSpacer)
+      elemSpacer.setAttribute("collapsed", false);
+  }
 }
 
 // From the current folder tree, return the selected server or null
 function GetSelectedServer() {
-    let currentFolder = GetSelectedMsgFolder();
-    return currentFolder ? currentFolder.server : null;
+  let currentFolder = GetSelectedMsgFolder();
+  return currentFolder ? currentFolder.server : null;
 }
 
 // From the current folder tree, return the selected folder,
 // the root folder of default account or null
 function GetSelectedMsgFolder() {
-    return window.parent.GetSelectedMsgFolders()[0] ||
-           window.parent.GetDefaultAccountRootFolder();
+  return window.parent.GetSelectedMsgFolders()[0] ||
+         window.parent.GetDefaultAccountRootFolder();
 }
 
 /**
  * Open Inbox for selected server.
  * If needed, open the twisty and select Inbox.
  */
 function ReadMessages() {
-    if (!selectedServer)
-        return;
-    try {
-        window.parent.OpenInboxForServer(selectedServer);
-    } catch (ex) {
-        Cu.reportError("Error opening Inbox for server: " + ex + "\n");
-    }
+  if (!selectedServer)
+    return;
+  try {
+    window.parent.OpenInboxForServer(selectedServer);
+  } catch (ex) {
+    Cu.reportError("Error opening Inbox for server: " + ex + "\n");
+  }
 }
 
 // Trigger composer for a new message
 function ComposeAMessage(event) {
-    // Pass event to allow holding Shift key for toggling HTML vs. plaintext format
-    window.parent.MsgNewMessage(event);
+  // Pass event to allow holding Shift key for toggling HTML vs. plaintext format
+  window.parent.MsgNewMessage(event);
 }
 
 /**
  * Open AccountManager to view settings for a given account
  * @param selectPage  the xul file name for the viewing page,
  *                    null for the account main page, other pages are
  *                    'am-server.xul', 'am-copies.xul', 'am-offline.xul',
  *                    'am-addressing.xul', 'am-smtp.xul'
  */
 function ViewSettings(selectPage) {
-    window.parent.MsgAccountManager(selectPage);
+  window.parent.MsgAccountManager(selectPage);
 }
 
 // Open AccountWizard to create an account
 function CreateNewAccount() {
-    window.parent.msgOpenAccountWizard();
+  window.parent.msgOpenAccountWizard();
 }
 
 function CreateNewAccountTB(type) {
   if (type == "mail") {
-    AddMailAccount();
-    return;
+  AddMailAccount();
+  return;
   }
 
   if (type == "feeds") {
-    AddFeedAccount();
-    return;
+  AddFeedAccount();
+  return;
   }
 
   window.parent.msgOpenAccountWizard(
-      function(state) {
-        let win = getMostRecentMailWindow();
-        if (state && win && win.gFolderTreeView && this.gCurrentAccount) {
-          win.gFolderTreeView.selectFolder(
-              this.gCurrentAccount.incomingServer.rootMsgFolder);
-        }
-      },
-      type);
+    function(state) {
+    let win = getMostRecentMailWindow();
+    if (state && win && win.gFolderTreeView && this.gCurrentAccount) {
+      win.gFolderTreeView.selectFolder(
+        this.gCurrentAccount.incomingServer.rootMsgFolder);
+    }
+    },
+    type);
 }
 
 // Bring up search interface for selected account
 function SearchMessages() {
-    window.parent.MsgSearchMessages();
+  window.parent.MsgSearchMessages();
 }
 
 // Open filters window
 function CreateMsgFilters() {
-    window.parent.MsgFilters(null, null);
+  window.parent.MsgFilters(null, null);
 }
 
 // Open Subscribe dialog
 function Subscribe() {
-    if (!selectedServer)
-        return;
-    if (selectedServer.type == "rss")
-        window.parent.openSubscriptionsDialog(selectedServer.rootFolder);
-    else
-        window.parent.MsgSubscribe();
+  if (!selectedServer)
+    return;
+  if (selectedServer.type == "rss")
+    window.parent.openSubscriptionsDialog(selectedServer.rootFolder);
+  else
+    window.parent.MsgSubscribe();
 }
 
 // Open junk mail settings dialog
 function JunkSettings() {
-    // TODO: function does not exist yet, will throw an exception if exposed
-    window.parent.MsgJunkMail();
+  // TODO: function does not exist yet, will throw an exception if exposed
+  window.parent.MsgJunkMail();
 }
--- a/mailnews/base/content/msgSynchronize.js
+++ b/mailnews/base/content/msgSynchronize.js
@@ -10,170 +10,170 @@ var gSynchronizeTree = null;
 var gParentMsgWindow;
 var gMsgWindow;
 
 var gInitialFolderStates = {};
 
 document.addEventListener("dialogaccept", syncOkButton);
 
 function OnLoad() {
-    if (window.arguments && window.arguments[0]) {
-        if (window.arguments[0].msgWindow) {
-            gParentMsgWindow = window.arguments[0].msgWindow;
-        }
+  if (window.arguments && window.arguments[0]) {
+    if (window.arguments[0].msgWindow) {
+      gParentMsgWindow = window.arguments[0].msgWindow;
     }
+  }
 
-    document.getElementById("syncMail").checked =
-      Services.prefs.getBoolPref("mailnews.offline_sync_mail");
-    document.getElementById("syncNews").checked =
-      Services.prefs.getBoolPref("mailnews.offline_sync_news");
-    document.getElementById("sendMessage").checked =
-      Services.prefs.getBoolPref("mailnews.offline_sync_send_unsent");
-    document.getElementById("workOffline").checked =
-      Services.prefs.getBoolPref("mailnews.offline_sync_work_offline");
+  document.getElementById("syncMail").checked =
+    Services.prefs.getBoolPref("mailnews.offline_sync_mail");
+  document.getElementById("syncNews").checked =
+    Services.prefs.getBoolPref("mailnews.offline_sync_news");
+  document.getElementById("sendMessage").checked =
+    Services.prefs.getBoolPref("mailnews.offline_sync_send_unsent");
+  document.getElementById("workOffline").checked =
+    Services.prefs.getBoolPref("mailnews.offline_sync_work_offline");
 
-    return true;
+  return true;
 }
 
 function syncOkButton() {
-    var syncMail = document.getElementById("syncMail").checked;
-    var syncNews = document.getElementById("syncNews").checked;
-    var sendMessage = document.getElementById("sendMessage").checked;
-    var workOffline = document.getElementById("workOffline").checked;
+  var syncMail = document.getElementById("syncMail").checked;
+  var syncNews = document.getElementById("syncNews").checked;
+  var sendMessage = document.getElementById("sendMessage").checked;
+  var workOffline = document.getElementById("workOffline").checked;
 
-    Services.prefs.setBoolPref("mailnews.offline_sync_mail", syncMail);
-    Services.prefs.setBoolPref("mailnews.offline_sync_news", syncNews);
-    Services.prefs.setBoolPref("mailnews.offline_sync_send_unsent", sendMessage);
-    Services.prefs.setBoolPref("mailnews.offline_sync_work_offline", workOffline);
+  Services.prefs.setBoolPref("mailnews.offline_sync_mail", syncMail);
+  Services.prefs.setBoolPref("mailnews.offline_sync_news", syncNews);
+  Services.prefs.setBoolPref("mailnews.offline_sync_send_unsent", sendMessage);
+  Services.prefs.setBoolPref("mailnews.offline_sync_work_offline", workOffline);
 
-    if (syncMail || syncNews || sendMessage || workOffline) {
-        var offlineManager = Cc["@mozilla.org/messenger/offline-manager;1"]
-                               .getService(Ci.nsIMsgOfflineManager);
-        if (offlineManager)
-            offlineManager.synchronizeForOffline(syncNews, syncMail, sendMessage, workOffline, gParentMsgWindow);
-    }
+  if (syncMail || syncNews || sendMessage || workOffline) {
+    var offlineManager = Cc["@mozilla.org/messenger/offline-manager;1"]
+                           .getService(Ci.nsIMsgOfflineManager);
+    if (offlineManager)
+      offlineManager.synchronizeForOffline(syncNews, syncMail, sendMessage, workOffline, gParentMsgWindow);
+  }
 }
 
 function OnSelect() {
-   top.window.openDialog("chrome://messenger/content/msgSelectOfflineFolders.xul", "",
-                         "centerscreen,chrome,modal,titlebar,resizable=yes");
-   return true;
+  top.window.openDialog("chrome://messenger/content/msgSelectOfflineFolders.xul", "",
+                        "centerscreen,chrome,modal,titlebar,resizable=yes");
+  return true;
 }
 
 // All the code below is only used by Seamonkey.
 
 function selectOkButton() {
-    return true;
+  return true;
 }
 
 function selectCancelButton() {
-    for (var resourceValue in gInitialFolderStates) {
-      let folder = MailUtils.getExistingFolder(resourceValue);
-      if (gInitialFolderStates[resourceValue])
-        folder.setFlag(Ci.nsMsgFolderFlags.Offline);
-      else
-        folder.clearFlag(Ci.nsMsgFolderFlags.Offline);
-    }
-    return true;
+  for (var resourceValue in gInitialFolderStates) {
+    let folder = MailUtils.getExistingFolder(resourceValue);
+    if (gInitialFolderStates[resourceValue])
+      folder.setFlag(Ci.nsMsgFolderFlags.Offline);
+    else
+      folder.clearFlag(Ci.nsMsgFolderFlags.Offline);
+  }
+  return true;
 }
 
 function selectOnLoad() {
-    gMsgWindow = Cc["@mozilla.org/messenger/msgwindow;1"]
-                   .createInstance(Ci.nsIMsgWindow);
-    gMsgWindow.domWindow = window;
-    gMsgWindow.rootDocShell.appType = Ci.nsIDocShell.APP_TYPE_MAIL;
+  gMsgWindow = Cc["@mozilla.org/messenger/msgwindow;1"]
+                 .createInstance(Ci.nsIMsgWindow);
+  gMsgWindow.domWindow = window;
+  gMsgWindow.rootDocShell.appType = Ci.nsIDocShell.APP_TYPE_MAIL;
 
-    gSynchronizeTree = document.getElementById("synchronizeTree");
+  gSynchronizeTree = document.getElementById("synchronizeTree");
 
-    SortSynchronizePane("folderNameCol", "?folderTreeNameSort");
+  SortSynchronizePane("folderNameCol", "?folderTreeNameSort");
 }
 
 function SortSynchronizePane(column, sortKey) {
-    var node = FindInWindow(window, column);
-    if (!node) {
-        dump("Couldnt find sort column\n");
-        return;
-    }
+  var node = FindInWindow(window, column);
+  if (!node) {
+    dump("Couldnt find sort column\n");
+    return;
+  }
 
-    node.setAttribute("sort", sortKey);
-    node.setAttribute("sortDirection", "natural");
-    var col = gSynchronizeTree.columns[column];
-    gSynchronizeTree.view.cycleHeader(col);
+  node.setAttribute("sort", sortKey);
+  node.setAttribute("sortDirection", "natural");
+  var col = gSynchronizeTree.columns[column];
+  gSynchronizeTree.view.cycleHeader(col);
 }
 
 function FindInWindow(currentWindow, id) {
-    var item = currentWindow.document.getElementById(id);
-    if (item)
-      return item;
+  var item = currentWindow.document.getElementById(id);
+  if (item)
+    return item;
 
-    for (var i = 0; i < currentWindow.frames.length; i++) {
-        var frameItem = FindInWindow(currentWindow.frames[i], id);
-        if (frameItem)
-            return frameItem;
-    }
+  for (var i = 0; i < currentWindow.frames.length; i++) {
+    var frameItem = FindInWindow(currentWindow.frames[i], id);
+    if (frameItem)
+      return frameItem;
+  }
 
-    return null;
+  return null;
 }
 
 
 function onSynchronizeClick(event) {
-    // we only care about button 0 (left click) events
-    if (event.button != 0)
-      return;
+  // we only care about button 0 (left click) events
+  if (event.button != 0)
+    return;
 
-    let treeCellInfo = gSynchronizeTree.getCellAt(event.clientX, event.clientY);
-    if (treeCellInfo.row == -1)
-      return;
+  let treeCellInfo = gSynchronizeTree.getCellAt(event.clientX, event.clientY);
+  if (treeCellInfo.row == -1)
+    return;
 
-    if (treeCellInfo.childElt == "twisty") {
-        var folderResource = GetFolderResource(gSynchronizeTree, treeCellInfo.row);
-        var folder = folderResource.QueryInterface(Ci.nsIMsgFolder);
+  if (treeCellInfo.childElt == "twisty") {
+    var folderResource = GetFolderResource(gSynchronizeTree, treeCellInfo.row);
+    var folder = folderResource.QueryInterface(Ci.nsIMsgFolder);
 
-        if (!(gSynchronizeTree.view.isContainerOpen(treeCellInfo.row))) {
-            var serverType = folder.server.type;
-            // imap is the only server type that does folder discovery
-            if (serverType != "imap") return;
+    if (!(gSynchronizeTree.view.isContainerOpen(treeCellInfo.row))) {
+      var serverType = folder.server.type;
+      // imap is the only server type that does folder discovery
+      if (serverType != "imap") return;
 
-            if (folder.isServer) {
-                var server = folder.server;
-                server.performExpand(gMsgWindow);
-            } else {
-                var imapFolder = folderResource.QueryInterface(Ci.nsIMsgImapMailFolder);
-                if (imapFolder) {
-                  imapFolder.performExpand(gMsgWindow);
-                }
-            }
+      if (folder.isServer) {
+        var server = folder.server;
+        server.performExpand(gMsgWindow);
+      } else {
+        var imapFolder = folderResource.QueryInterface(Ci.nsIMsgImapMailFolder);
+        if (imapFolder) {
+          imapFolder.performExpand(gMsgWindow);
         }
-    } else if (treeCellInfo.col.id == "syncCol") {
-        UpdateNode(GetFolderResource(gSynchronizeTree, treeCellInfo.row), treeCellInfo.row);
+      }
     }
+  } else if (treeCellInfo.col.id == "syncCol") {
+    UpdateNode(GetFolderResource(gSynchronizeTree, treeCellInfo.row), treeCellInfo.row);
+  }
 }
 
 function onSynchronizeTreeKeyPress(event) {
-    // for now, only do something on space key
-    if (event.charCode != KeyEvent.DOM_VK_SPACE)
-      return;
+  // for now, only do something on space key
+  if (event.charCode != KeyEvent.DOM_VK_SPACE)
+    return;
 
-    var treeSelection = gSynchronizeTree.view.selection;
-    for (let i = 0; i < treeSelection.getRangeCount(); i++) {
-      var start = {}, end = {};
-      treeSelection.getRangeAt(i, start, end);
-      for (let k = start.value; k <= end.value; k++)
-        UpdateNode(GetFolderResource(gSynchronizeTree, k), k);
-    }
+  var treeSelection = gSynchronizeTree.view.selection;
+  for (let i = 0; i < treeSelection.getRangeCount(); i++) {
+    var start = {}, end = {};
+    treeSelection.getRangeAt(i, start, end);
+    for (let k = start.value; k <= end.value; k++)
+      UpdateNode(GetFolderResource(gSynchronizeTree, k), k);
+  }
 }
 
 function UpdateNode(resource, row) {
-    var folder = resource.QueryInterface(Ci.nsIMsgFolder);
+  var folder = resource.QueryInterface(Ci.nsIMsgFolder);
 
-    if (folder.isServer)
-      return;
+  if (folder.isServer)
+    return;
 
-    if (!(resource.Value in gInitialFolderStates)) {
-      gInitialFolderStates[resource.Value] = folder.getFlag(Ci.nsMsgFolderFlags.Offline);
-    }
+  if (!(resource.Value in gInitialFolderStates)) {
+    gInitialFolderStates[resource.Value] = folder.getFlag(Ci.nsMsgFolderFlags.Offline);
+  }
 
-    folder.toggleFlag(Ci.nsMsgFolderFlags.Offline);
+  folder.toggleFlag(Ci.nsMsgFolderFlags.Offline);
 }
 
 function GetFolderResource(aTree, aIndex) {
   return aTree.view.getResourceAtIndex(aIndex);
 }
--- a/mailnews/base/prefs/content/AccountWizard.js
+++ b/mailnews/base/prefs/content/AccountWizard.js
@@ -271,32 +271,32 @@ function AccountDataToPageData(accountDa
   setPageData(pageData, "login", "username", server.username || "");
   setPageData(pageData, "login", "password", server.password || "");
   setPageData(pageData, "accname", "prettyName", server.prettyName || "");
   setPageData(pageData, "accname", "userset", false);
 
   var identity;
 
   if (accountData.identity) {
-      dump("This is an accountdata\n");
-      identity = accountData.identity;
+    dump("This is an accountdata\n");
+    identity = accountData.identity;
   } else if (accountData.identities) {
-      identity = accountData.identities.queryElementAt(0, Ci.nsIMsgIdentity);
-      dump("this is an account, id= " + identity + "\n");
+    identity = accountData.identities.queryElementAt(0, Ci.nsIMsgIdentity);
+    dump("this is an account, id= " + identity + "\n");
   }
 
   setPageData(pageData, "identity", "email", identity.email || "");
   setPageData(pageData, "identity", "fullName", identity.fullName || "");
 
   var smtp;
 
   if (accountData.smtp) {
-      smtp = accountData.smtp;
-      setPageData(pageData, "server", "smtphostname", smtp.hostname);
-      setPageData(pageData, "login", "smtpusername", smtp.username);
+    smtp = accountData.smtp;
+    setPageData(pageData, "server", "smtphostname", smtp.hostname);
+    setPageData(pageData, "login", "smtpusername", smtp.username);
   }
 }
 
 // take data from each page of pageData and dump it into accountData
 // use: to put results of wizard into a account-oriented object
 function PageDataToAccountData(pageData, accountData) {
   if (!accountData.identity)
     accountData.identity = {};
--- a/mailnews/base/prefs/content/accountUtils.js
+++ b/mailnews/base/prefs/content/accountUtils.js
@@ -12,45 +12,45 @@ var {AppConstants} = ChromeUtils.import(
 var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
 
 var gAnyValidIdentity = false; // If there are no valid identities for any account
 // returns the first account with an invalid server or identity
 
 var gNewAccountToLoad = null;   // used to load new messages if we come from the mail3pane
 
 function getInvalidAccounts(accounts) {
-    let numAccounts = accounts.length;
-    let invalidAccounts = [];
-    let numIdentities = 0;
-    for (let i = 0; i < numAccounts; i++) {
-        let account = accounts.queryElementAt(i, Ci.nsIMsgAccount);
-        try {
-            if (!account.incomingServer.valid) {
-                invalidAccounts[invalidAccounts.length] = account;
-                // skip to the next account
-                continue;
-            }
-        } catch (ex) {
-            // this account is busted, just keep going
-            continue;
-        }
+  let numAccounts = accounts.length;
+  let invalidAccounts = [];
+  let numIdentities = 0;
+  for (let i = 0; i < numAccounts; i++) {
+    let account = accounts.queryElementAt(i, Ci.nsIMsgAccount);
+    try {
+      if (!account.incomingServer.valid) {
+          invalidAccounts[invalidAccounts.length] = account;
+        // skip to the next account
+        continue;
+      }
+    } catch (ex) {
+      // this account is busted, just keep going
+      continue;
+    }
 
-        var identities = account.identities;
-        numIdentities = identities.length;
+    var identities = account.identities;
+    numIdentities = identities.length;
 
-        for (var j = 0; j < numIdentities; j++) {
-            let identity = identities.queryElementAt(j, Ci.nsIMsgIdentity);
-            if (identity.valid) {
-              gAnyValidIdentity = true;
-            } else {
-              invalidAccounts[invalidAccounts.length] = account;
-            }
-        }
+    for (var j = 0; j < numIdentities; j++) {
+      let identity = identities.queryElementAt(j, Ci.nsIMsgIdentity);
+      if (identity.valid) {
+        gAnyValidIdentity = true;
+      } else {
+        invalidAccounts[invalidAccounts.length] = account;
+      }
     }
-    return invalidAccounts;
+  }
+  return invalidAccounts;
 }
 
 function showMailIntegrationDialog() {
   const nsIShellService = Ci.nsIShellService;
 
   try {
     var shellService = Cc["@mozilla.org/suite/shell-service;1"]
                          .getService(nsIShellService);
@@ -80,84 +80,84 @@ function showMailIntegrationDialog() {
  *                   takes wizardCallback as an argument. The wizardCallback
  *                   doesn't take any arguments.
  */
 function verifyAccounts(wizardCallback, needsIdentity, wizardOpen) {
   var openWizard = false;
   var prefillAccount;
   var ret = true;
 
-    try {
-        // migrate quoting preferences from global to per account. This function returns
-        // true if it had to migrate, which we will use to mean this is a just migrated
-        // or new profile
-        var newProfile = migrateGlobalQuotingPrefs(MailServices.accounts.allIdentities);
+  try {
+    // migrate quoting preferences from global to per account. This function returns
+    // true if it had to migrate, which we will use to mean this is a just migrated
+    // or new profile
+    var newProfile = migrateGlobalQuotingPrefs(MailServices.accounts.allIdentities);
 
-        var accounts = MailServices.accounts.accounts;
+    var accounts = MailServices.accounts.accounts;
 
-        // as long as we have some accounts, we're fine.
-        var accountCount = accounts.length;
-        var invalidAccounts = getInvalidAccounts(accounts);
-        if (invalidAccounts.length > 0 && invalidAccounts.length == accountCount) {
-            prefillAccount = invalidAccounts[0];
-        }
+    // as long as we have some accounts, we're fine.
+    var accountCount = accounts.length;
+    var invalidAccounts = getInvalidAccounts(accounts);
+    if (invalidAccounts.length > 0 && invalidAccounts.length == accountCount) {
+      prefillAccount = invalidAccounts[0];
+    }
 
-        // if there are no accounts, or all accounts are "invalid"
-        // then kick off the account migration. Or if this is a new (to Mozilla) profile.
-        // MCD can set up accounts without the profile being used yet
-        if (newProfile) {
-          // check if MCD is configured. If not, say this is not a new profile
-          // so that we don't accidentally remigrate non MCD profiles.
-          var adminUrl = Services.prefs.getCharPref("autoadmin.global_config_url", "");
-          if (!adminUrl)
-            newProfile = false;
-        }
-        if ((newProfile && !accountCount) || accountCount == invalidAccounts.length)
-          openWizard = true;
+    // if there are no accounts, or all accounts are "invalid"
+    // then kick off the account migration. Or if this is a new (to Mozilla) profile.
+    // MCD can set up accounts without the profile being used yet
+    if (newProfile) {
+      // check if MCD is configured. If not, say this is not a new profile
+      // so that we don't accidentally remigrate non MCD profiles.
+      var adminUrl = Services.prefs.getCharPref("autoadmin.global_config_url", "");
+      if (!adminUrl)
+        newProfile = false;
+    }
+    if ((newProfile && !accountCount) || accountCount == invalidAccounts.length)
+      openWizard = true;
 
-        // openWizard is true if messenger migration returns some kind of
-        // error (including those cases where there is nothing to migrate).
-        // prefillAccount is non-null if there is at least one invalid account.
-        // gAnyValidIdentity is true when you've got at least one *valid*
-        // identity. Since local and RSS folders are identity-less accounts, if you
-        // only have one of those, it will be false.
-        // needsIdentity is true only when verifyAccounts is called from the
-        // compose window. This last condition is so that we open the account
-        // wizard if the user does not have any identities defined and tries to
-        // compose mail.
+    // openWizard is true if messenger migration returns some kind of
+    // error (including those cases where there is nothing to migrate).
+    // prefillAccount is non-null if there is at least one invalid account.
+    // gAnyValidIdentity is true when you've got at least one *valid*
+    // identity. Since local and RSS folders are identity-less accounts, if you
+    // only have one of those, it will be false.
+    // needsIdentity is true only when verifyAccounts is called from the
+    // compose window. This last condition is so that we open the account
+    // wizard if the user does not have any identities defined and tries to
+    // compose mail.
 
-        if (openWizard || prefillAccount || ((!gAnyValidIdentity) && needsIdentity)) {
-          if (wizardOpen != undefined)
-            wizardOpen(wizardCallback);
-          else
-            MsgAccountWizard(wizardCallback);
-          ret = false;
-        } else {
-          var localFoldersExists;
-          try {
-            localFoldersExists = MailServices.accounts.localFoldersServer;
-          } catch (ex) {
-            localFoldersExists = false;
-          }
+    if (openWizard || prefillAccount || ((!gAnyValidIdentity) && needsIdentity)) {
+      if (wizardOpen != undefined)
+        wizardOpen(wizardCallback);
+      else
+        MsgAccountWizard(wizardCallback);
+      ret = false;
+    } else {
+      var localFoldersExists;
+      try {
+        localFoldersExists = MailServices.accounts.localFoldersServer;
+      } catch (ex) {
+        localFoldersExists = false;
+      }
 
-          // we didn't create the MsgAccountWizard - we need to verify that local folders exists.
-          if (!localFoldersExists)
-            MailServices.accounts.createLocalMailAccount();
-        }
+      // we didn't create the MsgAccountWizard - we need to verify that local folders exists.
+      if (!localFoldersExists)
+        MailServices.accounts.createLocalMailAccount();
+    }
 
-        // This will do nothing on platforms without a shell service
-        if ("@mozilla.org/suite/shell-service;1" in Cc) {
-          // hack, set a time out to do this, so that the window can load first
-          setTimeout(showMailIntegrationDialog, 0);
-        }
-        return ret;
-    } catch (ex) {
-        dump("error verifying accounts " + ex + "\n");
-        return false;
+    // This will do nothing on platforms without a shell service
+    if ("@mozilla.org/suite/shell-service;1" in Cc) {
+      // hack, set a time out to do this, so that the window can load first
+      setTimeout(showMailIntegrationDialog, 0);
     }
+    return ret;
+  } catch (ex) {
+    dump("error verifying accounts " + ex + "\n");
+    return false;
+  }
 }
 
 // we do this from a timer because if this is called from the onload=
 // handler, then the parent window doesn't appear until after the wizard
 // has closed, and this is confusing to the user
 function MsgAccountWizard(wizardCallback) {
   setTimeout(function() { msgOpenAccountWizard(wizardCallback); }, 0);
 }
@@ -218,39 +218,39 @@ function AddFeedAccount() {
  *
  * @param selectPage  The xul file name for the viewing page or
  *                    null for the account main page. Other pages are
  *                    'am-server.xul', 'am-copies.xul', 'am-offline.xul',
  *                    'am-addressing.xul', 'am-smtp.xul'
  * @param  aServer    The server of the account to select. Optional.
  */
 function MsgAccountManager(selectPage, aServer) {
-    var existingAccountManager = Services.wm.getMostRecentWindow("mailnews:accountmanager");
+  var existingAccountManager = Services.wm.getMostRecentWindow("mailnews:accountmanager");
 
-    if (existingAccountManager) {
-        existingAccountManager.focus();
-    } else {
-        if (!aServer) {
-          if (typeof window.GetSelectedMsgFolders === "function") {
-            let folders = window.GetSelectedMsgFolders();
-            if (folders.length > 0)
-              aServer = folders[0].server;
-          }
-          if (!aServer && (typeof window.GetDefaultAccountRootFolder === "function")) {
-            let folder = window.GetDefaultAccountRootFolder();
-            if (folder instanceof Ci.nsIMsgFolder)
-              aServer = folder.server;
-          }
-        }
+  if (existingAccountManager) {
+    existingAccountManager.focus();
+  } else {
+    if (!aServer) {
+      if (typeof window.GetSelectedMsgFolders === "function") {
+        let folders = window.GetSelectedMsgFolders();
+        if (folders.length > 0)
+          aServer = folders[0].server;
+      }
+      if (!aServer && (typeof window.GetDefaultAccountRootFolder === "function")) {
+        let folder = window.GetDefaultAccountRootFolder();
+        if (folder instanceof Ci.nsIMsgFolder)
+          aServer = folder.server;
+      }
+    }
 
-        window.openDialog("chrome://messenger/content/AccountManager.xul",
-                          "AccountManager",
-                          "chrome,centerscreen,modal,titlebar,resizable",
-                          { server: aServer, selectPage });
-    }
+    window.openDialog("chrome://messenger/content/AccountManager.xul",
+                      "AccountManager",
+                      "chrome,centerscreen,modal,titlebar,resizable",
+                      { server: aServer, selectPage });
+  }
 }
 
 function loadInboxForNewAccount() {
   // gNewAccountToLoad is set in the final screen of the Account Wizard if a POP account
   // was created, the download messages box is checked, and the wizard was opened from the 3pane
   if (gNewAccountToLoad) {
     var rootMsgFolder = gNewAccountToLoad.incomingServer.rootMsgFolder;
     const kInboxFlag = Ci.nsMsgFolderFlags.Inbox;
--- a/mailnews/base/prefs/content/am-copies.js
+++ b/mailnews/base/prefs/content/am-copies.js
@@ -26,134 +26,134 @@ function onPreInit(account, accountValue
  * Also, initialize other UI elements (cc, bcc, fcc picker controller checkboxes).
  */
 function onInit(aPageId, aServerId) {
   gCurrentServerId = aServerId;
     onInitCopiesAndFolders();
 }
 
 function onInitCopiesAndFolders() {
-    SetGlobalRadioElemChoices();
+  SetGlobalRadioElemChoices();
 
-    SetFolderDisplay(gFccRadioElemChoice, gFccRadioElemChoiceLocked,
-                     "fcc",
-                     "msgFccAccountPicker",
-                     "identity.fccFolder",
-                     "msgFccFolderPicker");
+  SetFolderDisplay(gFccRadioElemChoice, gFccRadioElemChoiceLocked,
+                   "fcc",
+                   "msgFccAccountPicker",
+                   "identity.fccFolder",
+                   "msgFccFolderPicker");
 
-    SetFolderDisplay(gArchivesRadioElemChoice, gArchivesRadioElemChoiceLocked,
-                     "archive",
-                     "msgArchivesAccountPicker",
-                     "identity.archiveFolder",
-                     "msgArchivesFolderPicker");
+  SetFolderDisplay(gArchivesRadioElemChoice, gArchivesRadioElemChoiceLocked,
+                   "archive",
+                   "msgArchivesAccountPicker",
+                   "identity.archiveFolder",
+                   "msgArchivesFolderPicker");
 
-    SetFolderDisplay(gDraftsRadioElemChoice, gDraftsRadioElemChoiceLocked,
-                     "draft",
-                     "msgDraftsAccountPicker",
-                     "identity.draftFolder",
-                     "msgDraftsFolderPicker");
+  SetFolderDisplay(gDraftsRadioElemChoice, gDraftsRadioElemChoiceLocked,
+                   "draft",
+                   "msgDraftsAccountPicker",
+                   "identity.draftFolder",
+                   "msgDraftsFolderPicker");
 
-    SetFolderDisplay(gTmplRadioElemChoice, gTmplRadioElemChoiceLocked,
-                     "tmpl",
-                     "msgStationeryAccountPicker",
-                     "identity.stationeryFolder",
-                     "msgStationeryFolderPicker");
+  SetFolderDisplay(gTmplRadioElemChoice, gTmplRadioElemChoiceLocked,
+                   "tmpl",
+                   "msgStationeryAccountPicker",
+                   "identity.stationeryFolder",
+                   "msgStationeryFolderPicker");
 
-    setupCcTextbox(true);
-    setupBccTextbox(true);
-    setupFccItems();
-    setupArchiveItems();
+  setupCcTextbox(true);
+  setupBccTextbox(true);
+  setupFccItems();
+  setupArchiveItems();
 
-    SetSpecialFolderNamesWithDelims();
+  SetSpecialFolderNamesWithDelims();
 }
 
 // Initialize the picker mode choices (account/folder picker) into global vars
 function SetGlobalRadioElemChoices() {
-    var pickerModeElement = document.getElementById("identity.fccFolderPickerMode");
-    gFccRadioElemChoice = pickerModeElement.getAttribute("value");
-    gFccRadioElemChoiceLocked = pickerModeElement.getAttribute("disabled");
-    if (!gFccRadioElemChoice) gFccRadioElemChoice = gDefaultPickerMode;
+  var pickerModeElement = document.getElementById("identity.fccFolderPickerMode");
+  gFccRadioElemChoice = pickerModeElement.getAttribute("value");
+  gFccRadioElemChoiceLocked = pickerModeElement.getAttribute("disabled");
+  if (!gFccRadioElemChoice) gFccRadioElemChoice = gDefaultPickerMode;
 
-    pickerModeElement = document.getElementById("identity.archivesFolderPickerMode");
-    gArchivesRadioElemChoice = pickerModeElement.getAttribute("value");
-    gArchivesRadioElemChoiceLocked = pickerModeElement.getAttribute("disabled");
-    if (!gArchivesRadioElemChoice) gArchivesRadioElemChoice = gDefaultPickerMode;
+  pickerModeElement = document.getElementById("identity.archivesFolderPickerMode");
+  gArchivesRadioElemChoice = pickerModeElement.getAttribute("value");
+  gArchivesRadioElemChoiceLocked = pickerModeElement.getAttribute("disabled");
+  if (!gArchivesRadioElemChoice) gArchivesRadioElemChoice = gDefaultPickerMode;
 
-    pickerModeElement = document.getElementById("identity.draftsFolderPickerMode");
-    gDraftsRadioElemChoice = pickerModeElement.getAttribute("value");
-    gDraftsRadioElemChoiceLocked = pickerModeElement.getAttribute("disabled");
-    if (!gDraftsRadioElemChoice) gDraftsRadioElemChoice = gDefaultPickerMode;
+  pickerModeElement = document.getElementById("identity.draftsFolderPickerMode");
+  gDraftsRadioElemChoice = pickerModeElement.getAttribute("value");
+  gDraftsRadioElemChoiceLocked = pickerModeElement.getAttribute("disabled");
+  if (!gDraftsRadioElemChoice) gDraftsRadioElemChoice = gDefaultPickerMode;
 
-    pickerModeElement = document.getElementById("identity.tmplFolderPickerMode");
-    gTmplRadioElemChoice = pickerModeElement.getAttribute("value");
-    gTmplRadioElemChoiceLocked = pickerModeElement.getAttribute("disabled");
-    if (!gTmplRadioElemChoice) gTmplRadioElemChoice = gDefaultPickerMode;
+  pickerModeElement = document.getElementById("identity.tmplFolderPickerMode");
+  gTmplRadioElemChoice = pickerModeElement.getAttribute("value");
+  gTmplRadioElemChoiceLocked = pickerModeElement.getAttribute("disabled");
+  if (!gTmplRadioElemChoice) gTmplRadioElemChoice = gDefaultPickerMode;
 }
 
 /*
  * Set Account and Folder elements based on the values read from
  * preferences file. Default picker mode, if none specified at this stage, is
  * set to 1 i.e., Other picker displaying the folder value read from the
  * preferences file.
  */
 function SetFolderDisplay(pickerMode, disableMode,
                           radioElemPrefix,
                           accountPickerId,
                           folderPickedField,
                           folderPickerId) {
-    if (!pickerMode)
-        pickerMode = gDefaultPickerMode;
+  if (!pickerMode)
+    pickerMode = gDefaultPickerMode;
 
-    var selectAccountRadioId = radioElemPrefix + "_selectAccount";
-    var selectAccountRadioElem = document.getElementById(selectAccountRadioId);
-    var selectFolderRadioId = radioElemPrefix + "_selectFolder";
-    var selectFolderRadioElem = document.getElementById(selectFolderRadioId);
-    var accountPicker = document.getElementById(accountPickerId);
-    var folderPicker = document.getElementById(folderPickerId);
-    var rg = selectAccountRadioElem.radioGroup;
-    var folderPickedElement = document.getElementById(folderPickedField);
-    var uri = folderPickedElement.getAttribute("value");
-    // Get message folder from the given uri.
-    // There is no need to check for the existence of special folders as
-    // these folders are created on demand at runtime in case of imap accounts.
-    // For POP3 accounts, special folders are created at the account creation time.
-    var msgFolder = MailUtils.getOrCreateFolder(uri);
-    InitFolderDisplay(msgFolder.server.rootFolder, accountPicker);
-    InitFolderDisplay(msgFolder, folderPicker);
+  var selectAccountRadioId = radioElemPrefix + "_selectAccount";
+  var selectAccountRadioElem = document.getElementById(selectAccountRadioId);
+  var selectFolderRadioId = radioElemPrefix + "_selectFolder";
+  var selectFolderRadioElem = document.getElementById(selectFolderRadioId);
+  var accountPicker = document.getElementById(accountPickerId);
+  var folderPicker = document.getElementById(folderPickerId);
+  var rg = selectAccountRadioElem.radioGroup;
+  var folderPickedElement = document.getElementById(folderPickedField);
+  var uri = folderPickedElement.getAttribute("value");
+  // Get message folder from the given uri.
+  // There is no need to check for the existence of special folders as
+  // these folders are created on demand at runtime in case of imap accounts.
+  // For POP3 accounts, special folders are created at the account creation time.
+  var msgFolder = MailUtils.getOrCreateFolder(uri);
+  InitFolderDisplay(msgFolder.server.rootFolder, accountPicker);
+  InitFolderDisplay(msgFolder, folderPicker);
 
-    switch (pickerMode) {
-        case "0" :
-            rg.selectedItem = selectAccountRadioElem;
-            SetPickerEnabling(accountPickerId, folderPickerId);
-            break;
+  switch (pickerMode) {
+    case "0" :
+      rg.selectedItem = selectAccountRadioElem;
+      SetPickerEnabling(accountPickerId, folderPickerId);
+      break;
 
-        case "1" :
-            rg.selectedItem = selectFolderRadioElem;
-            SetPickerEnabling(folderPickerId, accountPickerId);
-            break;
+    case "1" :
+      rg.selectedItem = selectFolderRadioElem;
+      SetPickerEnabling(folderPickerId, accountPickerId);
+      break;
 
-        default :
-            dump("Error in setting initial folder display on pickers\n");
-            break;
-    }
+    default :
+      dump("Error in setting initial folder display on pickers\n");
+      break;
+  }
 
-    // Check to see if we need to lock page elements. Disable radio buttons
-    // and account/folder pickers when locked.
-    if (disableMode) {
-      selectAccountRadioElem.setAttribute("disabled", "true");
-      selectFolderRadioElem.setAttribute("disabled", "true");
-      accountPicker.setAttribute("disabled", "true");
-      folderPicker.setAttribute("disabled", "true");
-    }
+  // Check to see if we need to lock page elements. Disable radio buttons
+  // and account/folder pickers when locked.
+  if (disableMode) {
+    selectAccountRadioElem.setAttribute("disabled", "true");
+    selectFolderRadioElem.setAttribute("disabled", "true");
+    accountPicker.setAttribute("disabled", "true");
+    folderPicker.setAttribute("disabled", "true");
+  }
 }
 
 // Initialize the folder display based on prefs values
 function InitFolderDisplay(folder, folderPicker) {
-    folderPicker.menupopup.selectFolder(folder);
-    folderPicker.folder = folder;
+  folderPicker.menupopup.selectFolder(folder);
+  folderPicker.folder = folder;
 }
 
 /**
  * Capture any menulist changes and update the folder property.
  *
  * @param aGroup the prefix for the menulist we're handling (e.g. "drafts")
  * @param aType "Account" for the account picker or "Folder" for the folder
  *        picker
@@ -192,95 +192,95 @@ function noteSelectionChange(aGroup, aTy
   picker.folder = folder;
   picker.menupopup.selectFolder(folder);
 }
 
 // Need to append special folders when account picker is selected.
 // Create a set of global special folder vars to be suffixed to the
 // server URI of the selected account.
 function SetSpecialFolderNamesWithDelims() {
-    var folderDelim = "/";
-    /* we use internal names known to everyone like "Sent", "Templates" and "Drafts" */
+  var folderDelim = "/";
+  /* we use internal names known to everyone like "Sent", "Templates" and "Drafts" */
 
-    gFccFolderWithDelim = folderDelim + "Sent";
-    gArchivesFolderWithDelim = folderDelim + "Archives";
-    gDraftsFolderWithDelim = folderDelim + "Drafts";
-    gTemplatesFolderWithDelim = folderDelim + "Templates";
+  gFccFolderWithDelim = folderDelim + "Sent";
+  gArchivesFolderWithDelim = folderDelim + "Archives";
+  gDraftsFolderWithDelim = folderDelim + "Drafts";
+  gTemplatesFolderWithDelim = folderDelim + "Templates";
 }
 
 // Save all changes on this page
 function onSave() {
-    onSaveCopiesAndFolders();
+  onSaveCopiesAndFolders();
 }
 
 function onSaveCopiesAndFolders() {
-    SaveFolderSettings(gFccRadioElemChoice,
-                        "doFcc",
-                        gFccFolderWithDelim,
-                        "msgFccAccountPicker",
-                        "msgFccFolderPicker",
-                        "identity.fccFolder",
-                        "identity.fccFolderPickerMode");
+  SaveFolderSettings(gFccRadioElemChoice,
+                      "doFcc",
+                      gFccFolderWithDelim,
+                      "msgFccAccountPicker",
+                      "msgFccFolderPicker",
+                      "identity.fccFolder",
+                      "identity.fccFolderPickerMode");
 
-    SaveFolderSettings(gArchivesRadioElemChoice,
-                        "messageArchives",
-                        gArchivesFolderWithDelim,
-                        "msgArchivesAccountPicker",
-                        "msgArchivesFolderPicker",
-                        "identity.archiveFolder",
-                        "identity.archivesFolderPickerMode");
+  SaveFolderSettings(gArchivesRadioElemChoice,
+                      "messageArchives",
+                      gArchivesFolderWithDelim,
+                      "msgArchivesAccountPicker",
+                      "msgArchivesFolderPicker",
+                      "identity.archiveFolder",
+                      "identity.archivesFolderPickerMode");
 
-    SaveFolderSettings(gDraftsRadioElemChoice,
-                        "messageDrafts",
-                        gDraftsFolderWithDelim,
-                        "msgDraftsAccountPicker",
-                        "msgDraftsFolderPicker",
-                        "identity.draftFolder",
-                        "identity.draftsFolderPickerMode");
+  SaveFolderSettings(gDraftsRadioElemChoice,
+                      "messageDrafts",
+                      gDraftsFolderWithDelim,
+                      "msgDraftsAccountPicker",
+                      "msgDraftsFolderPicker",
+                      "identity.draftFolder",
+                      "identity.draftsFolderPickerMode");
 
-    SaveFolderSettings(gTmplRadioElemChoice,
-                        "messageTemplates",
-                        gTemplatesFolderWithDelim,
-                        "msgStationeryAccountPicker",
-                        "msgStationeryFolderPicker",
-                        "identity.stationeryFolder",
-                        "identity.tmplFolderPickerMode");
+  SaveFolderSettings(gTmplRadioElemChoice,
+                      "messageTemplates",
+                      gTemplatesFolderWithDelim,
+                      "msgStationeryAccountPicker",
+                      "msgStationeryFolderPicker",
+                      "identity.stationeryFolder",
+                      "identity.tmplFolderPickerMode");
 }
 
 // Save folder settings and radio element choices
 function SaveFolderSettings(radioElemChoice,
                             radioGroupId,
                             folderSuffix,
                             accountPickerId,
                             folderPickerId,
                             folderElementId,
                             folderPickerModeId) {
-    var formElement = document.getElementById(folderElementId);
-    var uri;
+  var formElement = document.getElementById(folderElementId);
+  var uri;
 
-    if (radioElemChoice == "0" ||
-        !document.getElementById(folderPickerId).value) {
-      // Default or revert to default if no folder chosen.
-      radioElemChoice = "0";
-      uri = document.getElementById(accountPickerId).folder.URI;
-      if (uri) {
-        // Create Folder URI.
-        uri = uri + folderSuffix;
-      }
-    } else if (radioElemChoice == "1") {
-      uri = document.getElementById(folderPickerId).folder.URI;
-    } else {
-      dump("Error saving folder preferences.\n");
-      return;
+  if (radioElemChoice == "0" ||
+      !document.getElementById(folderPickerId).value) {
+    // Default or revert to default if no folder chosen.
+    radioElemChoice = "0";
+    uri = document.getElementById(accountPickerId).folder.URI;
+    if (uri) {
+      // Create Folder URI.
+      uri = uri + folderSuffix;
     }
-
-    formElement.setAttribute("value", uri);
+  } else if (radioElemChoice == "1") {
+    uri = document.getElementById(folderPickerId).folder.URI;
+  } else {
+    dump("Error saving folder preferences.\n");
+    return;
+  }
 
-    formElement = document.getElementById(folderPickerModeId);
-    formElement.setAttribute("value", radioElemChoice);
+  formElement.setAttribute("value", uri);
+
+  formElement = document.getElementById(folderPickerModeId);
+  formElement.setAttribute("value", radioElemChoice);
 }
 
 // Check the Fcc Self item and setup associated picker state
 function setupFccItems() {
   let checked = document.getElementById("identity.doFcc").checked;
   document.querySelectorAll(".depends-on-do-fcc").forEach(e => {
     if (checked) {
       e.removeAttribute("disabled");
@@ -308,59 +308,59 @@ function setupFccItems() {
     default :
       dump("Error in setting Fcc elements.\n");
       break;
   }
 }
 
 // Disable CC textbox if CC checkbox is not checked
 function setupCcTextbox(init) {
-    var ccChecked = document.getElementById("identity.doCc").checked;
-    var ccTextbox = document.getElementById("identity.doCcList");
+  var ccChecked = document.getElementById("identity.doCc").checked;
+  var ccTextbox = document.getElementById("identity.doCcList");
 
-    ccTextbox.disabled = !ccChecked;
+  ccTextbox.disabled = !ccChecked;
 
-    if (ccChecked) {
-        if (ccTextbox.value == "") {
-            ccTextbox.value = document.getElementById("identity.email").value;
-            if (!init)
-                ccTextbox.select();
-        }
-    } else if ((ccTextbox.value == document.getElementById("identity.email").value) ||
-               (init && ccTextbox.getAttribute("value") == "")) {
-        ccTextbox.value = "";
+  if (ccChecked) {
+    if (ccTextbox.value == "") {
+        ccTextbox.value = document.getElementById("identity.email").value;
+      if (!init)
+          ccTextbox.select();
     }
+  } else if ((ccTextbox.value == document.getElementById("identity.email").value) ||
+             (init && ccTextbox.getAttribute("value") == "")) {
+    ccTextbox.value = "";
+  }
 }
 
 // Disable BCC textbox if BCC checkbox is not checked
 function setupBccTextbox(init) {
-    var bccChecked = document.getElementById("identity.doBcc").checked;
-    var bccTextbox = document.getElementById("identity.doBccList");
+  var bccChecked = document.getElementById("identity.doBcc").checked;
+  var bccTextbox = document.getElementById("identity.doBccList");
 
-    bccTextbox.disabled = !bccChecked;
+  bccTextbox.disabled = !bccChecked;
 
-    if (bccChecked) {
-        if (bccTextbox.value == "") {
-            bccTextbox.value = document.getElementById("identity.email").value;
-            if (!init)
-                bccTextbox.select();
-        }
-    } else if ((bccTextbox.value == document.getElementById("identity.email").value) ||
-               (init && bccTextbox.getAttribute("value") == "")) {
-        bccTextbox.value = "";
+  if (bccChecked) {
+    if (bccTextbox.value == "") {
+        bccTextbox.value = document.getElementById("identity.email").value;
+      if (!init)
+        bccTextbox.select();
     }
+  } else if ((bccTextbox.value == document.getElementById("identity.email").value) ||
+             (init && bccTextbox.getAttribute("value") == "")) {
+    bccTextbox.value = "";
+  }
 }
 
 // Enable and disable pickers based on the radio element clicked
 function SetPickerEnabling(enablePickerId, disablePickerId) {
-    var activePicker = document.getElementById(enablePickerId);
-    activePicker.removeAttribute("disabled");
+  var activePicker = document.getElementById(enablePickerId);
+  activePicker.removeAttribute("disabled");
 
-    var inactivePicker = document.getElementById(disablePickerId);
-    inactivePicker.setAttribute("disabled", "true");
+  var inactivePicker = document.getElementById(disablePickerId);
+  inactivePicker.setAttribute("disabled", "true");
 }
 
 // Set radio element choices and picker states
 function setPickersState(enablePickerId, disablePickerId, event) {
   SetPickerEnabling(enablePickerId, disablePickerId);
 
   var radioElemValue = event.target.value;
 
--- a/mailnews/base/prefs/content/am-offline.js
+++ b/mailnews/base/prefs/content/am-offline.js
@@ -14,52 +14,52 @@ var gServerType;
 var gImapIncomingServer;
 var gPref = null;
 var gLockedPref = null;
 var gOfflineMap = null; // map of folder URLs to offline flags
 var gOfflineFolders;    // initial state of allFoldersOffline checkbox
 var gToggleOccurred = false;
 
 function onInit(aPageId, aServerId) {
-    onLockPreference();
+  onLockPreference();
 
-    // init values here
-    initServerSettings();
-    initRetentionSettings();
-    initDownloadSettings();
-    initOfflineSettings();
+  // init values here
+  initServerSettings();
+  initRetentionSettings();
+  initDownloadSettings();
+  initOfflineSettings();
 
-    onCheckItem("offline.notDownloadMin", "offline.notDownload");
-    onCheckItem("nntp.downloadMsgMin", "nntp.downloadMsg");
-    onCheckItem("nntp.removeBodyMin", "nntp.removeBody");
-    onCheckKeepMsg();
+  onCheckItem("offline.notDownloadMin", "offline.notDownload");
+  onCheckItem("nntp.downloadMsgMin", "nntp.downloadMsg");
+  onCheckItem("nntp.removeBodyMin", "nntp.removeBody");
+  onCheckKeepMsg();
 }
 
 /**
  * Store initial offline flag for each folder and the allFoldersOffline
  * checkbox. Use to restore the flags and checkbox if edits are canceled.
  */
 function initOfflineSettings() {
-    gOfflineMap = collectOfflineFolders();
-    gOfflineFolders = document.getElementById("offline.folders").checked;
-    gToggleOccurred = false;
+  gOfflineMap = collectOfflineFolders();
+  gOfflineFolders = document.getElementById("offline.folders").checked;
+  gToggleOccurred = false;
 }
 
 function initServerSettings() {
-    document.getElementById("offline.notDownload").checked =  gIncomingServer.limitOfflineMessageSize;
-    document.getElementById("autosync.notDownload").checked =  gIncomingServer.limitOfflineMessageSize;
-    if (gIncomingServer.maxMessageSize > 0)
-        document.getElementById("offline.notDownloadMin").value = gIncomingServer.maxMessageSize;
-    else
-        document.getElementById("offline.notDownloadMin").value = "50";
+  document.getElementById("offline.notDownload").checked =  gIncomingServer.limitOfflineMessageSize;
+  document.getElementById("autosync.notDownload").checked =  gIncomingServer.limitOfflineMessageSize;
+  if (gIncomingServer.maxMessageSize > 0)
+    document.getElementById("offline.notDownloadMin").value = gIncomingServer.maxMessageSize;
+  else
+    document.getElementById("offline.notDownloadMin").value = "50";
 
-    if (gServerType == "imap") {
-        gImapIncomingServer = gIncomingServer.QueryInterface(Ci.nsIImapIncomingServer);
-        document.getElementById("offline.folders").checked =  gImapIncomingServer.offlineDownload;
-    }
+  if (gServerType == "imap") {
+    gImapIncomingServer = gIncomingServer.QueryInterface(Ci.nsIImapIncomingServer);
+    document.getElementById("offline.folders").checked =  gImapIncomingServer.offlineDownload;
+  }
 }
 
 function initRetentionSettings() {
   let retentionSettings = gIncomingServer.retentionSettings;
   initCommonRetentionSettings(retentionSettings);
 
   document.getElementById("nntp.removeBody").checked = retentionSettings.cleanupBodiesByDays;
   document.getElementById("nntp.removeBodyMin").value =
@@ -143,19 +143,19 @@ function onPreInit(account, accountValue
       retentionLabel.setAttribute("hidden", "true");
       var applyToFlaggedCheckbox = document.getElementById("retention.applyToFlagged");
       applyToFlaggedCheckbox.setAttribute("hidden", "true");
     }
   }
 }
 
 function onClickSelect() {
-    top.window.openDialog("chrome://messenger/content/msgSelectOfflineFolders.xul",
-                          "", "centerscreen,chrome,modal,titlebar,resizable=yes");
-    return true;
+  top.window.openDialog("chrome://messenger/content/msgSelectOfflineFolders.xul",
+                        "", "centerscreen,chrome,modal,titlebar,resizable=yes");
+  return true;
 }
 
 /**
  * Handle updates to the Autosync
  */
 function onAutosyncChange() {
   let autosyncSelect = document.getElementById("autosyncSelect");
   let autosyncInterval = document.getElementById("autosyncInterval");
@@ -191,19 +191,19 @@ function onAutosyncNotDownload() {
   // is changed it simply copies the new checkbox value over to the element
   // driving the preference.
   document.getElementById("offline.notDownload").checked =
     document.getElementById("autosync.notDownload").checked;
   onCheckItem("offline.notDownloadMin", "offline.notDownload");
 }
 
 function onCancel() {
-    // restore the offline flags for all folders
-    restoreOfflineFolders(gOfflineMap);
-    document.getElementById("offline.folders").checked = gOfflineFolders;
+  // restore the offline flags for all folders
+  restoreOfflineFolders(gOfflineMap);
+  document.getElementById("offline.folders").checked = gOfflineFolders;
 }
 
 /**
  * Prompt to avoid unexpected folder sync changes.
  */
 function onLeave() {
   let changed = false;
   if (gToggleOccurred) {
@@ -240,131 +240,130 @@ function onLeave() {
       onCancel();
       return false;
     }
   }
   return true;
 }
 
 function onSave() {
-    var downloadSettings =
-      Cc["@mozilla.org/msgDatabase/downloadSettings;1"]
-        .createInstance(Ci.nsIMsgDownloadSettings);
+  var downloadSettings = Cc["@mozilla.org/msgDatabase/downloadSettings;1"]
+                           .createInstance(Ci.nsIMsgDownloadSettings);
 
-    gIncomingServer.limitOfflineMessageSize = document.getElementById("offline.notDownload").checked;
-    gIncomingServer.maxMessageSize = document.getElementById("offline.notDownloadMin").value;
+  gIncomingServer.limitOfflineMessageSize = document.getElementById("offline.notDownload").checked;
+  gIncomingServer.maxMessageSize = document.getElementById("offline.notDownloadMin").value;
 
-    var retentionSettings = saveCommonRetentionSettings(gIncomingServer.retentionSettings);
+  var retentionSettings = saveCommonRetentionSettings(gIncomingServer.retentionSettings);
 
-    retentionSettings.daysToKeepBodies = document.getElementById("nntp.removeBodyMin").value;
-    retentionSettings.cleanupBodiesByDays = document.getElementById("nntp.removeBody").checked;
+  retentionSettings.daysToKeepBodies = document.getElementById("nntp.removeBodyMin").value;
+  retentionSettings.cleanupBodiesByDays = document.getElementById("nntp.removeBody").checked;
 
-    downloadSettings.downloadByDate = document.getElementById("nntp.downloadMsg").checked;
-    downloadSettings.downloadUnreadOnly = document.getElementById("nntp.notDownloadRead").checked;
-    downloadSettings.ageLimitOfMsgsToDownload = document.getElementById("nntp.downloadMsgMin").value;
+  downloadSettings.downloadByDate = document.getElementById("nntp.downloadMsg").checked;
+  downloadSettings.downloadUnreadOnly = document.getElementById("nntp.notDownloadRead").checked;
+  downloadSettings.ageLimitOfMsgsToDownload = document.getElementById("nntp.downloadMsgMin").value;
 
-    gIncomingServer.retentionSettings = retentionSettings;
-    gIncomingServer.downloadSettings = downloadSettings;
+  gIncomingServer.retentionSettings = retentionSettings;
+  gIncomingServer.downloadSettings = downloadSettings;
 
-    if (gImapIncomingServer) {
-        // Set the pref on the incomingserver, and set the flag on all folders.
-        gImapIncomingServer.offlineDownload = document.getElementById("offline.folders").checked;
-    }
+  if (gImapIncomingServer) {
+    // Set the pref on the incomingserver, and set the flag on all folders.
+    gImapIncomingServer.offlineDownload = document.getElementById("offline.folders").checked;
+  }
 }
 
 // Does the work of disabling an element given the array which contains xul id/prefstring pairs.
 // Also saves the id/locked state in an array so that other areas of the code can avoid
 // stomping on the disabled state indiscriminately.
 function disableIfLocked(prefstrArray) {
-    if (!gLockedPref)
-      gLockedPref = [];
+  if (!gLockedPref)
+    gLockedPref = [];
 
-    for (let i = 0; i < prefstrArray.length; i++) {
-        var id = prefstrArray[i].id;
-        var element = document.getElementById(id);
-        if (gPref.prefIsLocked(prefstrArray[i].prefstring)) {
-            element.disabled = true;
-            gLockedPref[id] = true;
-        } else {
-            element.removeAttribute("disabled");
-            gLockedPref[id] = false;
-        }
+  for (let i = 0; i < prefstrArray.length; i++) {
+    var id = prefstrArray[i].id;
+    var element = document.getElementById(id);
+    if (gPref.prefIsLocked(prefstrArray[i].prefstring)) {
+      element.disabled = true;
+      gLockedPref[id] = true;
+    } else {
+      element.removeAttribute("disabled");
+      gLockedPref[id] = false;
     }
+  }
 }
 
 // Disables xul elements that have associated preferences locked.
 function onLockPreference() {
-    var initPrefString = "mail.server";
-    var finalPrefString;
+  var initPrefString = "mail.server";
+  var finalPrefString;
 
-    // This panel does not use the code in AccountManager.js to handle
-    // the load/unload/disable.  keep in mind new prefstrings and changes
-    // to code in AccountManager, and update these as well.
-    var allPrefElements = [
-      { prefstring: "limit_offline_message_size", id: "offline.notDownload" },
-      { prefstring: "limit_offline_message_size", id: "autosync.notDownload" },
-      { prefstring: "max_size", id: "offline.notDownloadMin" },
-      { prefstring: "downloadUnreadOnly", id: "nntp.notDownloadRead" },
-      { prefstring: "downloadByDate", id: "nntp.downloadMsg" },
-      { prefstring: "ageLimit", id: "nntp.downloadMsgMin" },
-      { prefstring: "retainBy", id: "retention.keepMsg" },
-      { prefstring: "daysToKeepHdrs", id: "retention.keepOldMsgMin" },
-      { prefstring: "numHdrsToKeep", id: "retention.keepNewMsgMin" },
-      { prefstring: "daysToKeepBodies", id: "nntp.removeBodyMin" },
-      { prefstring: "cleanupBodies", id: "nntp.removeBody" },
-      { prefstring: "applyToFlagged", id: "retention.applyToFlagged" },
-      { prefstring: "disable_button.selectFolder", id: "selectNewsgroupsButton" },
-      { prefstring: "disable_button.selectFolder", id: "selectImapFoldersButton" },
-    ];
+  // This panel does not use the code in AccountManager.js to handle
+  // the load/unload/disable.  keep in mind new prefstrings and changes
+  // to code in AccountManager, and update these as well.
+  var allPrefElements = [
+    { prefstring: "limit_offline_message_size", id: "offline.notDownload" },
+    { prefstring: "limit_offline_message_size", id: "autosync.notDownload" },
+    { prefstring: "max_size", id: "offline.notDownloadMin" },
+    { prefstring: "downloadUnreadOnly", id: "nntp.notDownloadRead" },
+    { prefstring: "downloadByDate", id: "nntp.downloadMsg" },
+    { prefstring: "ageLimit", id: "nntp.downloadMsgMin" },
+    { prefstring: "retainBy", id: "retention.keepMsg" },
+    { prefstring: "daysToKeepHdrs", id: "retention.keepOldMsgMin" },
+    { prefstring: "numHdrsToKeep", id: "retention.keepNewMsgMin" },
+    { prefstring: "daysToKeepBodies", id: "nntp.removeBodyMin" },
+    { prefstring: "cleanupBodies", id: "nntp.removeBody" },
+    { prefstring: "applyToFlagged", id: "retention.applyToFlagged" },
+    { prefstring: "disable_button.selectFolder", id: "selectNewsgroupsButton" },
+    { prefstring: "disable_button.selectFolder", id: "selectImapFoldersButton" },
+  ];
 
-    finalPrefString = initPrefString + "." + gIncomingServer.key + ".";
-    gPref = Services.prefs.getBranch(finalPrefString);
+  finalPrefString = initPrefString + "." + gIncomingServer.key + ".";
+  gPref = Services.prefs.getBranch(finalPrefString);
 
-    disableIfLocked(allPrefElements);
+  disableIfLocked(allPrefElements);
 }
 
 function onCheckItem(changeElementId, checkElementId) {
-    var element = document.getElementById(changeElementId);
-    var checked = document.getElementById(checkElementId).checked;
-    if (checked && !gLockedPref[checkElementId]) {
-        element.removeAttribute("disabled");
-    } else {
-        element.setAttribute("disabled", "true");
-    }
+  var element = document.getElementById(changeElementId);
+  var checked = document.getElementById(checkElementId).checked;
+  if (checked && !gLockedPref[checkElementId]) {
+    element.removeAttribute("disabled");
+  } else {
+    element.setAttribute("disabled", "true");
+  }
 }
 
 function toggleOffline() {
-    let offline = document.getElementById("offline.folders").checked;
-    let allFolders = gIncomingServer.rootFolder.descendants;
-    for (let folder of fixIterator(allFolders, Ci.nsIMsgFolder)) {
-      if (offline)
-        folder.setFlag(Ci.nsMsgFolderFlags.Offline);
-      else
-        folder.clearFlag(Ci.nsMsgFolderFlags.Offline);
-    }
-    gToggleOccurred = true;
+  let offline = document.getElementById("offline.folders").checked;
+  let allFolders = gIncomingServer.rootFolder.descendants;
+  for (let folder of fixIterator(allFolders, Ci.nsIMsgFolder)) {
+    if (offline)
+      folder.setFlag(Ci.nsMsgFolderFlags.Offline);
+    else
+      folder.clearFlag(Ci.nsMsgFolderFlags.Offline);
+  }
+  gToggleOccurred = true;
 }
 
 function collectOfflineFolders() {
-    let offlineFolderMap = {};
-    let allFolders = gIncomingServer.rootFolder.descendants;
-    for (let folder of fixIterator(allFolders, Ci.nsIMsgFolder))
-      offlineFolderMap[folder.folderURL] = folder.getFlag(Ci.nsMsgFolderFlags.Offline);
+  let offlineFolderMap = {};
+  let allFolders = gIncomingServer.rootFolder.descendants;
+  for (let folder of fixIterator(allFolders, Ci.nsIMsgFolder))
+    offlineFolderMap[folder.folderURL] = folder.getFlag(Ci.nsMsgFolderFlags.Offline);
 
-    return offlineFolderMap;
+  return offlineFolderMap;
 }
 
 function restoreOfflineFolders(offlineFolderMap) {
-    let allFolders = gIncomingServer.rootFolder.descendants;
-    for (let folder of fixIterator(allFolders, Ci.nsIMsgFolder)) {
-      if (offlineFolderMap[folder.folderURL])
-        folder.setFlag(Ci.nsMsgFolderFlags.Offline);
-      else
-        folder.clearFlag(Ci.nsMsgFolderFlags.Offline);
-    }
+  let allFolders = gIncomingServer.rootFolder.descendants;
+  for (let folder of fixIterator(allFolders, Ci.nsIMsgFolder)) {
+    if (offlineFolderMap[folder.folderURL])
+      folder.setFlag(Ci.nsMsgFolderFlags.Offline);
+    else
+      folder.clearFlag(Ci.nsMsgFolderFlags.Offline);
+  }
 }
 
 /**
  * Checks if the user selected a permanent removal of messages from a server
  * listed in the confirmfor attribute and warns about it.
  *
  * @param aRadio  The radiogroup element containing the retention options.
  */
--- a/mailnews/base/prefs/content/am-server.js
+++ b/mailnews/base/prefs/content/am-server.js
@@ -255,38 +255,38 @@ function onAdvanced() {
         parent.setAccountValue(accountValues, "server", "spamActionTargetFolder",
                                spamActionTargetFolder);
       }
     }
   }
 }
 
 function secureSelect(aLoading) {
-    var socketType = document.getElementById("server.socketType").value;
-    var defaultPort = gServer.protocolInfo.getDefaultServerPort(false);
-    var defaultPortSecure = gServer.protocolInfo.getDefaultServerPort(true);
-    var port = document.getElementById("server.port");
-    var portDefault = document.getElementById("defaultPort");
-    var prevDefaultPort = portDefault.value;
+  var socketType = document.getElementById("server.socketType").value;
+  var defaultPort = gServer.protocolInfo.getDefaultServerPort(false);
+  var defaultPortSecure = gServer.protocolInfo.getDefaultServerPort(true);
+  var port = document.getElementById("server.port");
+  var portDefault = document.getElementById("defaultPort");
+  var prevDefaultPort = portDefault.value;
 
-    if (socketType == Ci.nsMsgSocketType.SSL) {
-      portDefault.value = defaultPortSecure;
-      if (port.value == "" || (!aLoading && port.value == defaultPort && prevDefaultPort != portDefault.value))
-        port.value = defaultPortSecure;
-    } else {
-        portDefault.value = defaultPort;
-        if (port.value == "" || (!aLoading && port.value == defaultPortSecure && prevDefaultPort != portDefault.value))
-          port.value = defaultPort;
-    }
+  if (socketType == Ci.nsMsgSocketType.SSL) {
+    portDefault.value = defaultPortSecure;
+    if (port.value == "" || (!aLoading && port.value == defaultPort && prevDefaultPort != portDefault.value))
+      port.value = defaultPortSecure;
+  } else {
+    portDefault.value = defaultPort;
+    if (port.value == "" || (!aLoading && port.value == defaultPortSecure && prevDefaultPort != portDefault.value))
+      port.value = defaultPort;
+  }
 
-    // switch "insecure password" label
-    setLabelFromStringBundle("authMethod-password-cleartext",
-        socketType == Ci.nsMsgSocketType.SSL ||
-        socketType == Ci.nsMsgSocketType.alwaysSTARTTLS ?
-        "authPasswordCleartextViaSSL" : "authPasswordCleartextInsecurely");
+  // switch "insecure password" label
+  setLabelFromStringBundle("authMethod-password-cleartext",
+    socketType == Ci.nsMsgSocketType.SSL ||
+    socketType == Ci.nsMsgSocketType.alwaysSTARTTLS ?
+    "authPasswordCleartextViaSSL" : "authPasswordCleartextInsecurely");
 }
 
 function setupMailOnServerUI() {
   onCheckItem("pop3.deleteMailLeftOnServer", ["pop3.leaveMessagesOnServer"]);
   setupAgeMsgOnServerUI();
 }
 
 function setupAgeMsgOnServerUI() {
--- a/mailnews/base/prefs/content/aw-done.js
+++ b/mailnews/base/prefs/content/aw-done.js
@@ -5,105 +5,105 @@
 
 /* import-globals-from AccountWizard.js */
 
 var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
 
 var gPrefsBundle;
 
 function donePageInit() {
-    var pageData = parent.GetPageData();
-    gPrefsBundle = document.getElementById("bundle_prefs");
+  var pageData = parent.GetPageData();
+  gPrefsBundle = document.getElementById("bundle_prefs");
 
-    // Find out if we need to hide details for incoming servers
-    var hideIncoming = pageData.server &&
-      pageData.server.servertype.value == "movemail";
+  // Find out if we need to hide details for incoming servers
+  var hideIncoming = pageData.server &&
+    pageData.server.servertype.value == "movemail";
 
-    var email = "";
-    if (pageData.identity && pageData.identity.email) {
-        // fixup the email
-        email = pageData.identity.email.value;
-    }
-    setDivTextFromForm("identity.email", email);
+  var email = "";
+  if (pageData.identity && pageData.identity.email) {
+    // fixup the email
+    email = pageData.identity.email.value;
+  }
+  setDivTextFromForm("identity.email", email);
 
-    let userName = "";
-    if (pageData.login && pageData.login.username)
-        userName = pageData.login.username.value;
-    if (!userName && email)
-        userName = getUsernameFromEmail(email);
+  let userName = "";
+  if (pageData.login && pageData.login.username)
+    userName = pageData.login.username.value;
+  if (!userName && email)
+    userName = getUsernameFromEmail(email);
 
-    // Hide the "username" field if we don't want to show information
-    // on the incoming server.
-    setDivTextFromForm("server.username", hideIncoming ? null : userName);
+  // Hide the "username" field if we don't want to show information
+  // on the incoming server.
+  setDivTextFromForm("server.username", hideIncoming ? null : userName);
 
-    let smtpUserName = "";
-    if (pageData.login && pageData.login.smtpusername)
-        smtpUserName = pageData.login.smtpusername.value;
-    if (!smtpUserName && email)
-        smtpUserName = getUsernameFromEmail(email);
-    setDivTextFromForm("smtpServer.username", smtpUserName);
+  let smtpUserName = "";
+  if (pageData.login && pageData.login.smtpusername)
+    smtpUserName = pageData.login.smtpusername.value;
+  if (!smtpUserName && email)
+    smtpUserName = getUsernameFromEmail(email);
+  setDivTextFromForm("smtpServer.username", smtpUserName);
 
-    if (pageData.accname && pageData.accname.prettyName) {
-      setDivTextFromForm("account.name", pageData.accname.prettyName.value);
-    } else {
-      setDivTextFromForm("account.name", "");
-    }
+  if (pageData.accname && pageData.accname.prettyName) {
+    setDivTextFromForm("account.name", pageData.accname.prettyName.value);
+  } else {
+    setDivTextFromForm("account.name", "");
+  }
 
-    // Show mail servers (incoming & outgoing) details based on current account
-    // data.
-    if (!serverIsNntp(pageData)) {
-        let incomingServerName = "";
-        if (pageData.server && pageData.server.hostname) {
-            incomingServerName = pageData.server.hostname.value;
-        }
-        // Hide the incoming server name field if the user specified
-        // wizardHideIncoming in the ISP defaults file
-        setDivTextFromForm("server.name", hideIncoming ? null : incomingServerName);
-        setDivTextFromForm("server.port", pageData.server.port ? pageData.server.port.value : null);
-        let incomingServerType = "";
-        if (pageData.server && pageData.server.servertype) {
-            incomingServerType = pageData.server.servertype.value;
-        }
-        setDivTextFromForm("server.type", incomingServerType.toUpperCase());
+  // Show mail servers (incoming & outgoing) details based on current account
+  // data.
+  if (!serverIsNntp(pageData)) {
+    let incomingServerName = "";
+    if (pageData.server && pageData.server.hostname) {
+      incomingServerName = pageData.server.hostname.value;
+    }
+    // Hide the incoming server name field if the user specified
+    // wizardHideIncoming in the ISP defaults file
+    setDivTextFromForm("server.name", hideIncoming ? null : incomingServerName);
+    setDivTextFromForm("server.port", pageData.server.port ? pageData.server.port.value : null);
+    let incomingServerType = "";
+    if (pageData.server && pageData.server.servertype) {
+      incomingServerType = pageData.server.servertype.value;
+    }
+    setDivTextFromForm("server.type", incomingServerType.toUpperCase());
 
-        let smtpServerName = "";
-        if (pageData.server && pageData.server.smtphostname) {
-          let smtpServer = MailServices.smtp.defaultServer;
-          smtpServerName = pageData.server.smtphostname.value;
-          if (!smtpServerName && smtpServer && smtpServer.hostname)
-              smtpServerName = smtpServer.hostname;
-        }
-        setDivTextFromForm("smtpServer.name", smtpServerName);
-    } else {
-        setDivTextFromForm("server.name", null);
-        setDivTextFromForm("server.type", null);
-        setDivTextFromForm("server.port", null);
-        setDivTextFromForm("smtpServer.name", null);
+    let smtpServerName = "";
+    if (pageData.server && pageData.server.smtphostname) {
+      let smtpServer = MailServices.smtp.defaultServer;
+      smtpServerName = pageData.server.smtphostname.value;
+      if (!smtpServerName && smtpServer && smtpServer.hostname)
+          smtpServerName = smtpServer.hostname;
     }
+    setDivTextFromForm("smtpServer.name", smtpServerName);
+  } else {
+    setDivTextFromForm("server.name", null);
+    setDivTextFromForm("server.type", null);
+    setDivTextFromForm("server.port", null);
+    setDivTextFromForm("smtpServer.name", null);
+  }
 
-    if (serverIsNntp(pageData)) {
-        let newsServerName = "";
-        if (pageData.newsserver && pageData.newsserver.hostname)
-            newsServerName = pageData.newsserver.hostname.value;
-        if (newsServerName) {
-            // No need to show username for news account
-            setDivTextFromForm("server.username", null);
-        }
-        setDivTextFromForm("newsServer.name", newsServerName);
-        setDivTextFromForm("server.port", null);
-    } else {
-        setDivTextFromForm("newsServer.name", null);
+  if (serverIsNntp(pageData)) {
+    let newsServerName = "";
+    if (pageData.newsserver && pageData.newsserver.hostname)
+      newsServerName = pageData.newsserver.hostname.value;
+    if (newsServerName) {
+      // No need to show username for news account
+      setDivTextFromForm("server.username", null);
     }
+    setDivTextFromForm("newsServer.name", newsServerName);
+    setDivTextFromForm("server.port", null);
+  } else {
+    setDivTextFromForm("newsServer.name", null);
+  }
 
-    var isPop = false;
-    if (pageData.server && pageData.server.servertype) {
-      isPop = (pageData.server.servertype.value == "pop3");
-    }
+  var isPop = false;
+  if (pageData.server && pageData.server.servertype) {
+    isPop = (pageData.server.servertype.value == "pop3");
+  }
 
-    hideShowDownloadMsgsUI(isPop);
+  hideShowDownloadMsgsUI(isPop);
 }
 
 function hideShowDownloadMsgsUI(isPop) {
   // only show the "download messages now" UI
   // if this is a pop account, we are online, and this was opened
   // from the 3 pane
   var downloadMsgs = document.getElementById("downloadMsgs");
   if (isPop) {
@@ -115,24 +115,25 @@ function hideShowDownloadMsgsUI(isPop) {
     }
   }
 
   // else hide it
   downloadMsgs.hidden = true;
 }
 
 function setDivTextFromForm(divid, value) {
-    // collapse the row if the div has no value
-    var div = document.getElementById(divid);
-    if (!value) {
-        div.setAttribute("collapsed", "true");
-        return;
-    }
+  // collapse the row if the div has no value
+  var div = document.getElementById(divid);
+  if (!value) {
+    div.setAttribute("collapsed", "true");
+    return;
+  }
+
+  div.removeAttribute("collapsed");
 
-    div.removeAttribute("collapsed");
+  // otherwise fill in the .text element
+  div = document.getElementById(divid + ".text");
+  if (!div)
+    return;
 
-    // otherwise fill in the .text element
-    div = document.getElementById(divid + ".text");
-    if (!div) return;
-
-    // set the value
-    div.setAttribute("value", value);
+  // set the value
+  div.setAttribute("value", value);
 }