1 /****************************离å¼é¾æ¥********************************/ 2// ç»ä¸å¼¹çªå½æ° 3function showRedirectWarning(url) { 4 const outUrlEl = document.getElementById('outUrl'); 5 if (outUrlEl) outUrlEl.innerText = url; 6 const hashEl = document.getElementById('hash'); 7 if (hashEl) hashEl.click(); 8 9 $(".alert-mengban").fadeIn(200); 10 $(".alert-warning").delay(200).show().animate({top: "200px"}, 300); 11} 12 13// åå§åå¼¹çªå ³éäºä»¶ 14$(function() { 15 $("#closets, .fangqi, .alert-mengban").off("click").on("click", function() { 16 $(".alert-warning").animate({top: "-400px"}, 200).hide(300); 17 $(".alert-mengban").delay(300).fadeOut(300); 18 }); 19 20 $(".continue").off("click").on("click", function() { 21 $(".alert-warning").hide(200); 22 $(".alert-mengban").delay(200).fadeOut(200); 23 }); 24}); 25 26// æ£æ¥æ¯å¦éè¦å¼¹çªç彿°ï¼æç»ä¼åçï¼ 27function shouldTriggerPopup(url) { 28 // æ URLææ æURL 29 if (!url || typeof url !== 'string') return false; 30 31 const lowerUrl = url.toLowerCase(); 32 33 // æé¤ä»¥ä¸æ åµï¼ 34 // 1. ç©ºé¾æ¥ 35 // 2. JavaScript伪åè®® 36 // 3. 纯éç¹é¾æ¥ 37 // 4. å½å页é¢é¾æ¥ 38 if (lowerUrl === "" || 39 lowerUrl.startsWith('javascript:') || 40 lowerUrl === '#' || 41 lowerUrl.startsWith('#') || 42 lowerUrl === window.location.href.toLowerCase()) { 43 return false; 44 } 45 46 try { 47 // 使ç¨URL对象å¤çåç§æ ¼å¼çURL 48 const urlObj = new URL(lowerUrl, window.location.origin); 49 50 // ç½å忣æ¥ï¼ç¹å®è·¯å¾ååå 51 const hostPath = urlObj.hostname + urlObj.pathname; 52 53 const isSpecificPath = ( 54 hostPath === 'search.gd.gov.cn/search/all/766001' 55 ); 56 57 const isYunfuDomain = ( 58 urlObj.hostname.endsWith('.yunfu.gov.cn') || 59 urlObj.hostname === 'yunfu.gov.cn' 60 ); 61 62 // åªå¨è¿äºç½ååæ åµä¸ä¸å¼¹çª 63 return !(isSpecificPath || isYunfuDomain); 64 65 } catch (e) { 66 // å¯¹äºæ æ³è§£æä¸ºææURLç龿¥æä¸éè¦å¼¹çªå¤ç 67 return false; 68 } 69} 70 71// 龿¥ç¹å»äºä»¶å¤ç 72$("a").on("click", function(e) { 73 const url = this.href || $(this).attr('href') || ''; 74 75 if (shouldTriggerPopup(url)) { 76 showRedirectWarning(url); 77 e.preventDefault(); 78 return false; 79 } 80}); 81 82// 䏿æ¡åæ´äºä»¶å¤ç 83$("select").on("change", function() { 84 const url = $(this).find("option:selected").val() || ''; 85 86 if (shouldTriggerPopup(url)) { 87 showRedirectWarning(url); 88 return false; 89 } 90}); 91/****************************离å¼é¾æ¥********************************/
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.