1 /** 2 * 卿å ç´ è°ç¨ 3 */ 4 $(document).on("click", "a", function (event) { 5 var outerURL = this.getAttribute("href"); 6 checkDomain(event, outerURL, {domainUrl:["//scjgj.wuhan.gov.cn/","http://gsj.wuhan.gov.cn"], domainName: "ä¸å½Â·2003ç½ç«å¤ªé³éå¢",domainType:0}); 7 }); 8 /** 9 * <a>æ ç¾è¿è¡è°ç¨ 10 */ 11 $("a").each(function () { 12 $(this).click(function (event) { 13 var outerURL = this.getAttribute("href"); 14 checkDomain(event, outerURL, {domainUrl: ["//scjgj.wuhan.gov.cn/","http://gsj.wuhan.gov.cn"], domainName: "ä¸å½Â·2003ç½ç«å¤ªé³éå¢",domainType:0}); 15 }); 16 }); 17 /** 18 * <select>æ ç¾è¿è¡è°ç¨ 19 * ç»selectæ ç¾æ·»å ä¸ä¸ªclassï¼eg:<select class="checkDomain"> 20 */ 21 $(".checkDomain").each(function () { 22 $(this).change(function (event) { 23 var outerURL = this.value; 24 if (outerURL) { 25 checkDomain(event, outerURL,{domainUrl: ["//scjgj.wuhan.gov.cn/","http://gsj.wuhan.gov.cn"], domainName: "ä¸å½Â·2003ç½ç«å¤ªé³éå¢",domainType:1}); 26 this.selectedIndex = 0; 27 } 28 }); 29 }); 30 31 function checkDomain(event, outerURL, settings) { 32 if (!arguments[0]) { 33 //alert("ä¼ å ¥çåæ°æ ¼å¼æè¯¯ï¼"); 34 return; 35 } 36 37 if (!arguments[1]) { 38 // alert("ä¼ å ¥çåæ°æ ¼å¼æè¯¯ï¼"); 39 return; 40 } 41 42 var defaultSetting = { 43 domainUrl: [window.location.host], 44 domainName: window.location.host, 45 domainType: 0 46 } 47 48 var extendSetting = $.extend(defaultSetting, settings); 49 50 if (/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/.test(outerURL)) { 51 52 if (outerURL != "" && outerURL.toLowerCase().indexOf("javascript:") == -1) { 53 var domainUrlFlag = false; 54 for (var item in extendSetting.domainUrl) { 55 if (outerURL.toLowerCase().indexOf(extendSetting.domainUrl[item]) == -1) { 56 domainUrlFlag = false; 57 } else { 58 domainUrlFlag = true; 59 break; 60 } 61 } 62 63 if (!domainUrlFlag) { 64 //黿¢é»è®¤äºä»¶ 65 if (event.preventDefault) { 66 event.preventDefault(); 67 } else { 68 event.returnValue = false; 69 } 70 document.getElementById("modalDomainName").innerHTML = extendSetting.domainName; 71 document.getElementById("modalOuterURL").value = outerURL; 72 $('#myModal').removeClass("hide"); 73 74 $('#myModal').modal('show'); 75 $('#myModal').modal('show'); 76 } else { 77 if (1 === parseInt(extendSetting.domainType)) { 78 window.open(outerURL); 79 } 80 } 81 } 82 } 83 } 84 85 /** 86 * 页é¢è·³è½¬ 87 */ 88 function toRedirect() { 89 $('#myModal').modal('hide'); 90 var outerURL = document.getElementById("modalOuterURL").value; 91 window.open(outerURL); 92 }
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.