1var compareUtil = { 2 cName : "CA_COMPARE_LIST", 3 cExp : 1000 * 3600 * 24 * 365, 4 maxCds : 30, // æå¤§ç»é²ä»¶æ° 5 _getListAarray : function() { 6 var cVal = Cs_Util.getCookie(this.cName); 7 return cVal ? cVal.split('*') : []; 8 }, 9 getListStrWithAddModelCd : function(modelcd, addIdx) { 10 var cds = this._getListAarray(), 11 idx = addIdx === undefined ? false : addIdx, 12 listStr = ""; 13 14 if(cds.length >= this.maxCds) return false; 15 if(idx !== false && cds.length < idx) idx = false; 16 17 if(cds.indexOf(modelcd) < 0){ 18 if(idx === false){ 19 cds.push(modelcd); 20 } else{ 21 cds.splice(idx, 0, modelcd); 22 } 23 } 24 listStr = cds.join('*'); 25 Cs_Util.setCookie(this.cName, listStr, this.cExp); 26 return listStr; 27 }, 28 getListStrWithDelModelCd : function(modelcd) { 29 var cds = this._getListAarray(), 30 idx = cds.indexOf(modelcd), 31 listStr = ""; 32 33 if(idx >= 0) cds.splice(idx, 1); 34 listStr = cds.join('*'); 35 Cs_Util.setCookie(this.cName, listStr, this.cExp); 36 return listStr; 37 }, 38 getListStrWithSwitchModelCd : function(delModelcd, addModelcd) { 39 var cds = this._getListAarray(), 40 idx = cds.indexOf(delModelcd), 41 listStr = ""; 42 43 if(idx < 0) return; 44 45 if(cds.indexOf(addModelcd) < 0){ 46 cds.splice(idx, 1, addModelcd); 47 } 48 listStr = cds.join('*'); 49 Cs_Util.setCookie(this.cName, listStr, this.cExp); 50 return listStr; 51 }, 52 locationHref : function(list) { 53 var href = "/catalog/compare/", 54 cVal = Cs_Util.getCookie(this.cName); 55 if(list || cVal){ 56 href += "?list="; 57 href += list ? list : cVal; 58 } 59 window.location.href = href; 60 }, 61 isExistModelCd : function(modelcd) { 62 var cds = this._getListAarray(); 63 return cds.indexOf(modelcd) >= 0; 64 }, 65 getListCount : function(){ 66 var cds = this._getListAarray(); 67 return cds.length; 68 } 69}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.