1var getHost = function(url) { 2 var host = "null"; 3 if (typeof url == "undefined" || null == url) url = window.location.host; 4 var regex = /^\/[\w\/]*/; 5 var match = url.match(regex); 6 if (typeof match != "undefined" && null != match) host = window.location.host; 7 return host; 8}; 9$(document).ready(function () { 10 var domain = 'gov.cn',ignore = window.location.hostname; 11 $("a").click(function(){ 12 var o = $(this); 13 var url = o.attr('href'),host = getHost(url); 14 if(url == undefined || url == '' ){ 15 return; 16 } 17 if (host.indexOf(domain) == -1 && host.indexOf(ignore) == -1 && url.indexOf(domain) == -1 && url.indexOf(ignore) == -1 && url.indexOf("javascript") && url.indexOf('#') == -1 && url != "#"){ 18 $(this).attr('target','_self'); 19 $(this).attr('href','javascript:void(0)'); 20 var w = '480px'; 21 var h = '170px'; 22 var siteName = $("meta[name=SiteName]").attr('content'); 23 if (!siteName) { 24 siteName = 'ä¸è³å¿äººæ°æ¿åº'; 25 } 26 if(window.screen.width < 768) { w = '90%'; h = '170px';} 27 var cf = layer.confirm('<div style="margin-top:15px; font-size:16px;">æ¨è®¿é®ç龿¥å³å°ç¦»å¼â' + siteName + 'ç½ç«âï¼å°è®¿é®å¤é¨é¾æ¥å°å为' + url + 'ï¼æ¯å¦ç»§ç»ï¼</div>', { 28 btn:[ 'ç»§ç»è®¿é®', 'æ¾å¼' ], 29 title: false, 30 shade: 0.7, 31 area: [w, h], 32 cancel: function(index){ o.attr('href',url); } 33 }, function() { 34 window.open(url); 35 o.attr('href',url); 36 layer.close(cf); 37 }, function() { 38 o.attr('href',url); 39 }); 40 } 41 }); 42});
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.