1//éæ¿åºç½ç«è·³è½¬æç¤º 2String.prototype.startWith=function(str){ 3 if(str==null||str==""||this.length==0||str.length>this.length) 4 return false; 5 if(this.substr(0,str.length)==str) 6 return true; 7 else 8 return false; 9 return true; 10 } 11 12/** 13 * ç¹å»å¤é¾è¯¢é®ç¦»å¼ 14 * @param {this对象} _this this对象ã 15 * @param {string} type ç±»å"aLink"为a龿¥ï¼"select"为select䏿ã 16 */ 17function isExcelLink(_this, type) { 18 var o = $(_this); 19 var linkEcrypted = false; 20 var thisSrc = ""; 21 var target = ""; 22 if (type == "aLink") { 23 thisSrc = o.attr('href'); 24 } else if (type == "select" && !!$('option:selected', o).attr('value')) { 25 thisSrc = o.val(); 26 } else { 27 return false; 28 } 29 //夿æ¯å¦å è½½ layer.js åºï¼æ²¡æçè¯å è½½ï¼ 30 if (typeof layer === 'undefined') { 31 $('body').prepend('<link href="/global/layer.css" rel="stylesheet" type="text/css">'); 32 $('body').prepend('<script src="/global/layer.js"></script>'); 33 } 34 //å å ¥ä¸éè¦å¤é¾æç¤ºç龿¥ 35 if(thisSrc!=null&&thisSrc.indexOf(document.domain)<0&&!thisSrc.startWith('/')&&!thisSrc.startWith('..') && thisSrc.split("?")[0].indexOf("gov.cn")<0){ 36 if(thisSrc.startWith('www.') || thisSrc.startWith('http')){ 37 o.removeAttr('href'); 38 var jx = true; 39 var w = '480px'; 40 var h = 'auto'; 41 if(window.screen.width < 768) { w = '90%'; h = 'auto';} 42 var cf = layer.confirm('<div style="margin-top:15px; font-size:18px;">æ¨å³å°è®¿é®éæ¿åºç½ç«é¾æ¥ï¼æ¯å¦ç»§ç»ï¼</div>', { 43// var cf = layer.confirm('<div style="margin-top:20px; font-size:16px;">æ¨è®¿é®ç龿¥å³å°ç¦»å¼â'+document.querySelector("title").innerText+'â æ¯å¦ç»§ç»ï¼</div>', { 44 btn:[ 'ç»§ç»è®¿é®', 'æ¾å¼' ], 45 title: false, 46 shade: 0.7, 47 area: [w, h], 48 shadeClose: true, 49 cancel: function(index){ o.attr('href',thisSrc); } 50 }, function() { 51 o.attr('href',thisSrc); 52 layer.close(cf); 53 window.open(thisSrc); 54 }, function() { 55 o.attr('href',thisSrc); 56 }); 57 } 58 } 59 else if (type == "select") { 60 window.open(thisSrc); 61 } 62 else if (type == "aLink" && linkEcrypted) { 63 window.open(thisSrc); 64 } 65} 66 67$(document).on('click', 'a:not("[data-power-noExcelLinks] a,[data-power-noExcelLink]")', function () { 68 isExcelLink(this, "aLink"); 69}); 70$(document).on('change','[data-power-select-ExcelLink]',function () { 71 isExcelLink(this, "select"); 72}); 73 74/* 75//ç¹å»å¤é¾è¯¢é®ç¦»å¼ 76$(document).on('click','a',function(){ 77 var o = $(this); 78 var thisSrc = o.attr('href'); 79 //夿æ¯å¦å è½½ layer.js åºï¼æ²¡æçè¯å è½½ï¼ 80 if (typeof layer === 'undefined') { 81 $('body').prepend('<link href="/global/layer.css" rel="stylesheet" type="text/css">'); 82 $('body').prepend('<script src="/global/layer.js"></script>'); 83 } 84 //å å ¥ä¸éè¦å¤é¾æç¤ºç龿¥ 85 if(thisSrc!=null&&thisSrc.indexOf(document.domain)<0&&!thisSrc.startWith('/')&&!thisSrc.startWith('..') && thisSrc.split("?")[0].indexOf("gov.cn")<0){ 86 if(thisSrc.startWith('www.') || thisSrc.startWith('http')){ 87 o.removeAttr('href'); 88 var jx = true; 89 var w = '480px'; 90 var h = 'auto'; 91 if(window.screen.width < 768) { w = '90%'; h = 'auto';} 92 var cf = layer.confirm('<div style="margin-top:20px; font-size:16px;">æ¨è®¿é®ç龿¥å³å°ç¦»å¼â'+document.querySelector("title").innerText+'â鍿·ç½ç« æ¯å¦ç»§ç»ï¼</div>', { 93 btn:[ 'ç»§ç»è®¿é®', 'æ¾å¼' ], 94 title: false, 95 shade: 0.7, 96 area: [w, h], 97 shadeClose: true, 98 cancel: function(index){ o.attr('href',thisSrc); } 99 }, function() { 100 o.attr('href',thisSrc); 101 layer.close(cf); 102 window.open(thisSrc); 103 }, function() { 104 o.attr('href',thisSrc); 105 }); 106 } 107 } 108}); 109*/
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.