Changeset ddb9c5


Ignore:
Timestamp:
Aug 24, 2008, 6:43:36 PM (13 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
79c6c5
Parents:
4062d1
Message:

changed for javascript strict

Location:
chrome/content/v_identity
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • chrome/content/v_identity/vI_getHeader.js

    r4062d1 rddb9c5  
    5252       
    5353        // prepare headerToSearch for speedup.
    54         var index
    55         for (index = 0; index < headerList.length; index++) {
     54        for (var index = 0; index < headerList.length; index++) {
    5655            var headerToSearch_splitted = headerList[index].split(/:/)
    5756            // use first part (all before ':') as the header name
     
    9695        var currentHeadersCounter = []
    9796        // loop through the headers
    98         for (header in currentHeaderData) {
    99             headerName = currentHeaderData[header].headerName.toLowerCase()
     97        for (var header in currentHeaderData) {
     98            var headerName = currentHeaderData[header].headerName.toLowerCase()
    10099
    101100            // remember list-id header to prevent using Mailing-List addresses as sender
     
    111110                    "[:" + currentHeadersCounter[headerName] + "]");
    112111           
    113             for (index = 0; index < vI_getHeader.headerToSearch.length; index++) {
     112            for (var index = 0; index < vI_getHeader.headerToSearch.length; index++) {
    114113                if (headerName == vI_getHeader.headerToSearch[index].headerNameToSearch &&
    115114                    (isNaN(vI_getHeader.headerToSearch[index].headerNumberToSearch) ||
     
    141140   
    142141    hideExtraHeader: function() {
    143         var index;
    144142        var header_list = vI_prepareHeader.addedHeaders
    145         for (index = 0; index < header_list.length; index++) {
     143        for (var index = 0; index < header_list.length; index++) {
    146144            var header_to_search_splitted=header_list[index].split(/:/)
    147145            var header_to_search=header_to_search_splitted[0].toLowerCase()
     
    224222                + " ";
    225223
    226             for (index = 0; index < header_list.length; index++) {
     224            for (var index = 0; index < header_list.length; index++) {
    227225                var headerToSearch_splitted = header_list[index].split(/:/)
    228226                var headerToSearch = headerToSearch_splitted[0].toLowerCase()
     
    230228                var j; var found = false;
    231229                // check if Header is included in collapsed HeaderView
    232                 for (j = 0; j < gCollapsedHeaderList.length; j++) {
     230                for (var j = 0; j < gCollapsedHeaderList.length; j++) {
    233231                    if (gCollapsedHeaderList[j].name == headerToSearch) {
    234232                        vI_notificationBar.dump("## vI_prepareHeader: Header '" + headerToSearch + "' in gCollapsedHeaderList\n");
     
    238236                if (found) continue;
    239237                // check if Header is included in expanded HeaderView
    240                 for (j = 0; j < gExpandedHeaderList.length; j++) {
     238                for (var j = 0; j < gExpandedHeaderList.length; j++) {
    241239                    if (gExpandedHeaderList[j].name == headerToSearch) {
    242240                        vI_notificationBar.dump("## vI_prepareHeader: Header '" + headerToSearch + "' in gExpandedHeaderList\n");
     
    276274            var extraHdrs = vI_prepareHeader.prefroot.getCharPref("mailnews.headers.extraExpandedHeaders").toLowerCase().split(/ /);
    277275       
    278             for (i = 0; i < vI_prepareHeader.addedHeaders.length; i++) {
    279                 for (j = 0; j < extraHdrs.length; j++) {
     276            for (var i = 0; i < vI_prepareHeader.addedHeaders.length; i++) {
     277                for (var j = 0; j < extraHdrs.length; j++) {
    280278                    if (extraHdrs[j] == vI_prepareHeader.addedHeaders[i]) {
    281279                        extraHdrs.splice(j,1);
  • chrome/content/v_identity/vI_helper.js

    r4062d1 rddb9c5  
    5252    getID : function (idKey) {
    5353        if (!this.ID_NAMES) this.__getIDnames();
    54         return this.ID_NAMES[idKey];
     54        return (this.ID_NAMES[idKey])?this.ID_NAMES[idKey]:null;
    5555    },
    5656    getSMTPname : function (smtpKey) {
  • chrome/content/v_identity/vI_htmlTextBox.js

    r4062d1 rddb9c5  
    7777    __echo : function (text) {
    7878        var text_list = text.split(/\n/)
    79         for (i = 0; i < text_list.length; i++) {
     79        for (var i = 0; i < text_list.length; i++) {
    8080            if (vI_htmlTextBox.__isHR(text_list[i])) continue;
    8181            var text_item = vI_htmlTextBox.__checkList(text_list[i]);
  • chrome/content/v_identity/vI_rdfDataEditor.js

    r4062d1 rddb9c5  
    6060        var MenuItems = document.getElementById("identity_list_popup").childNodes
    6161       
    62         for (index = 0; index < MenuItems.length; index++) {
     62        for (var index = 0; index < MenuItems.length; index++) {
    6363            if (MenuItems[index].getAttribute("value") == window.arguments[0]["idKey"]) {
    6464                document.getElementById("identity_list").selectedItem =
  • chrome/content/v_identity/vI_smartIdentity.js

    r4062d1 rddb9c5  
    158158        if (filterList.length == 0) filterList[0] == ""
    159159       
    160         for (i = 0; i < filterList.length; i++) {
     160        for (var i = 0; i < filterList.length; i++) {
    161161            const filterType = { None : 0, RegExp : 1, StrCmp : 2 }
    162162            var recentfilterType; var skipRegExp = false;
     
    168168            else    { vI_notificationBar.dump("## vI_smartIdentity: filter emails, compare with '"
    169169                    + filterList[i] + "'\n"); recentfilterType = filterType.StrCmp; }
    170             for (j = 0; j < smartIdentities.number; j++) { // check if recent email-address (pre-choosen identity) is found in
     170            for (var j = 0; j < smartIdentities.number; j++) { // check if recent email-address (pre-choosen identity) is found in
    171171            // copied and adapted from correctIdentity, thank you for the RegExp-idea!
    172172                var add_addr = false;
     
    204204        var reply_headers = vI.unicodeConverter.ConvertToUnicode(vI.preferences.getCharPref("smart_reply_headers")).split(/\n/)
    205205                   
    206         for (index = 0; index < reply_headers.length; index++) {
     206        for (var index = 0; index < reply_headers.length; index++) {
    207207            // ------------- prepare fields to read the stored header ----------------
    208208            var replyHeader_splitted = reply_headers[index].split(/:/)
     
    237237           
    238238            // move found addresses step by step to allIdentities, and change values if requested
    239             for (i = 0; i < splitted.number; i++) {
     239            for (var i = 0; i < splitted.number; i++) {
    240240                // if there is no email than it makes no sense to use it as a sender
    241241                if (!splitted.emails.value[i].match(/^.*@.*$/)) {
     
    318318            var smart_reply_defaultFullName = vI.unicodeConverter.ConvertToUnicode(vI.preferences.getCharPref("smart_reply_defaultFullName"))
    319319            if (smart_reply_defaultFullName != "") {
    320                 for (index = 0; index < smartIdentities.number; index++) {
     320                for (var index = 0; index < smartIdentities.number; index++) {
    321321                    if (smartIdentities.fullNames[index] == "") {
    322322                        smartIdentities.fullNames[index] = smart_reply_defaultFullName
     
    335335                vI_notificationBar.dump("## vI_smartIdentity: compare with existing Identities (ignoring FullNames).\n")
    336336           
    337                 for (index = 0; index < smartIdentities.number; index++) {
     337                for (var index = 0; index < smartIdentities.number; index++) {
    338338                    var idKey = smartIdentities.getIdentityData(index).isExistingIdentity(true);
    339339                    if (idKey) {
     
    387387                bcc_addresses.fullNames, bcc_addresses.combinedNames);
    388388           
    389             for (index = 0; index < bcc_addresses.number; index++) {
     389            for (var index = 0; index < bcc_addresses.number; index++) {
    390390                if (allIdentities.emails[index] == bcc_addresses.emails.value[index]) {
    391391                    skip_bcc = true; break;
  • chrome/content/v_identity/vI_smartReplyDialog.js

    r4062d1 rddb9c5  
    4545        //          id_keys : {}, smtp_keys : {} };
    4646        vI_smartReply_dialog.all_addresses = window.arguments[0];
    47         for (index = 0; index < vI_smartReply_dialog.all_addresses.number; index++) {
     47        for (var index = 0; index < vI_smartReply_dialog.all_addresses.number; index++) {
    4848            var menuentry = vI_smartReply_dialog.all_addresses.combinedNames[index]
    4949            var id = null; var smtp = null;
  • chrome/content/v_identity/vI_smtpSelector.js

    r4062d1 rddb9c5  
    9090        vI_notificationBar.dump("## v_smtpSelector: setMenuToKey '" + smtpKey + "'\n")
    9191        MenuItems = vI_smtpSelector.elements.Obj_SMTPServerListPopup.childNodes
    92         for (index = 0; index < MenuItems.length; index++) {
     92        for (var index = 0; index < MenuItems.length; index++) {
    9393            if (MenuItems[index].localName == "menuseparator") continue;
    9494            //~ vI_notificationBar.dump("## v_smtpSelector: compare with '" + MenuItems[index].getAttribute("key") + "'\n")
  • chrome/content/v_identity/vI_storage.js

    r4062d1 rddb9c5  
    7878            vI_notificationBar.dump("## vI_storage: isExistingIdentity compare with Identity " + this.id + "\n");
    7979
    80             identity = gAccountManager.getIdentity(this.id)
     80            var identity = gAccountManager.getIdentity(this.id)
    8181            if (this.__equalsIdentity(identity, ignoreFullName)) {
    8282                vI_notificationBar.dump("## vI_storage: existing Identity found: " + this.id + "\n");
     
    209209   
    210210    mergeWithoutDuplicates : function(addIdentityCollection) {
    211         for (index = 0; index < addIdentityCollection.number; index++)
     211        for (var index = 0; index < addIdentityCollection.number; index++)
    212212            this.addWithoutDuplicates(
    213213                addIdentityCollection.emails[index],
     
    220220
    221221    addWithoutDuplicates : function(email, fullName, combinedName, id_key, smtp_key, extras) {
    222         for (index = 0; index < this.number; index++) {
     222        for (var index = 0; index < this.number; index++) {
    223223            if (this.emails[index] == email &&
    224224                (!this.id_keys[index] || !id_key ||
     
    574574        if (recipientType != "addr_bcc" || !getCurrentIdentity().doBcc) return false
    575575        var doBccArray = gMsgCompose.compFields.SplitRecipients(getCurrentIdentity().doBccList, false);
    576         for ( var index = 0; index < doBccArray.count; index++ ) {
     576        for (var index = 0; index < doBccArray.count; index++ ) {
    577577            if (doBccArray.StringAt(index) == awGetInputElement(row).value) {
    578578                vI_notificationBar.dump("## vI_storage: ignoring doBcc field '" +
  • chrome/content/v_identity/vI_upgrade.js

    r4062d1 rddb9c5  
    2323 * ***** END LICENSE BLOCK ***** */
    2424
    25 vI_upgrade = {
     25var vI_upgrade = {
    2626    preferences : Components.classes["@mozilla.org/preferences-service;1"]
    2727            .getService(Components.interfaces.nsIPrefService)
     
    147147                        { sourcePref : "storage_ignore_smart_reply", targetPref : "idSelection_storage_ignore_smart_reply" }) }];
    148148        // remove obsolete preference-tree virtualIdentity
    149         for (i = 0; i < transferPrefs.length; i++) {
     149        for (var i = 0; i < transferPrefs.length; i++) {
    150150            // if former version of extension was at least 0.5.0, start with WizardPage 0.5.2
    151151            if (!currentVersion || (vI_upgrade.versionChecker.compare(currentVersion, transferPrefs[i].version) < 0)) {
     
    175175                    { version : "0.5.6", prefs : Array("copyEnigmailSettings") } ];
    176176        // remove obsolete preference-tree virtualIdentity
    177         for (i = 0; i < obsoletePrefs.length; i++) {
     177        for (var i = 0; i < obsoletePrefs.length; i++) {
    178178            // if former version of extension was at least 0.5.0, start with WizardPage 0.5.2
    179179            if (!currentVersion || (vI_upgrade.versionChecker.compare(currentVersion, obsoletePrefs[i].version) < 0)) {
  • chrome/content/v_identity/v_identity.js

    r4062d1 rddb9c5  
    452452    {
    453453        MenuItems = vI_msgIdentityClone.elements.Obj_MsgIdentity.firstChild.childNodes
    454         for (index = 1; index <= MenuItems.length; index++) {
     454        for (var index = 1; index <= MenuItems.length; index++) {
    455455            if ( MenuItems[MenuItems.length - index].getAttribute("value") == vI_account.account.defaultIdentity.key )
    456456                vI_msgIdentityClone.elements.Obj_MsgIdentity.firstChild.removeChild(MenuItems[MenuItems.length - index])
Note: See TracChangeset for help on using the changeset viewer.