1 2if(window.location.href.indexOf('https')!=-1){ 3 var MYHAPI = 'https://www.mingyihui.net'; 4 } else { 5 var MYHAPI = 'http://www.mingyihui.net'; 6 } 7var userid = 0; 8 9 10 11 12$(function () { 13 if(!isCrawler()){ 14 $.ajax({ 15 url: SITEURL + '/api_check.php', 16 type: 'post', 17 data: { 'act': 'checkLogin' }, 18 success: function (res) { 19 res = JSON.parse(res) 20 if (res.userid) { 21 userid = res.userid; 22 //checkNoteNum() 23 } else { 24 $('.header_js_login').hide(); 25 $('.hospital_dislogin').show(); 26 userid = 0 27 } 28 } 29 }) 30 } 31 32 33 function isCrawler() { 34 var userAgent= navigator.userAgent; 35 // 常è§çç¬è«User-Agentå ³é®è¯ 36 const crawlers = [ 37 'googlebot', // Google ç¬è« 38 'bingbot', // Bing ç¬è« 39 'slurp', // Yahoo ç¬è« 40 'yandexbot', // Yandex ç¬è« 41 'baiduspider', // ç¾åº¦ç¬è« 42 'duckduckbot', // DuckDuckGo ç¬è« 43 'facebot', // Facebook ç¬è« 44 'ia_archiver', // Alexa ç¬è« 45 'twitterbot', // Twitter ç¬è« 46 'linkedinbot', // LinkedIn ç¬è« 47 'msnbot', // MSN ç¬è« 48 'ahrefsbot', // Ahrefs ç¬è« 49 'semrushbot', // SEMrush ç¬è« 50 'mj12bot', // Majestic ç¬è« 51 'seznambot', // Seznam ç¬è« 52 'dotbot', // DotBot ç¬è« 53 'exabot', // Exabot ç¬è« 54 'gigabot', // Gigabot ç¬è« 55 'sogou', // æçç¬è« 56 'bytespider', // åèè·³å¨ç¬è« 57 'petalbot', // Petal ç¬è« 58 'adsbot', // Google Ads ç¬è« 59 'applebot', // Apple ç¬è« 60 ]; 61 62 // å°User-Agent转æ¢ä¸ºå°åï¼æ¹ä¾¿å¹é 63 userAgent = userAgent.toLowerCase(); 64 65 // æ£æ¥User-Agentæ¯å¦å å«ç¬è«å ³é®è¯ 66 return crawlers.some(crawler => userAgent.includes(crawler)); 67 } 68}) 69 70$(document).on("click", ".CODEIMG span", function () { 71 $(this).parent().remove(); 72}) 73 74function headerCodeShows(url) { 75 var IMGHTML = "<div class='CODEIMG'><img src='" + url + "'><span>×</span></div>" 76 $("body").append(IMGHTML); 77} 78 79 80function checkNoteNum() { 81 $.ajax({
82 url: SITEURL + '/api_notice.php', 83 type: 'post', 84 data: { 'mode': 'notice' }, 85 success: function (res) { 86 res = JSON.parse(res); 87 if (res.newNoticeCount) { 88 $('#note_num').html(res.data.newNoticeCount); 89 $('#note_num2').html(res.data.newNoticeCount); 90 } else { 91 $('#note_num').remove(); 92 $('#note_num2').remove(); 93 } 94 $('.header_js_login').show(); 95 $('.hospital_dislogin').hide(); 96 } 97 }) 98} 99 100$(function(){ 101 102 $('.edit_info_icon').on('click',function(){ 103 $('.edit_info_box').show(); 104 }) 105 106 $('.close_edit_box').on('click',function(){ 107 $('.edit_info_box').hide(); 108 }) 109 // å·²ç»å½æçæ´å¤ 110 $(".header_js_login").hover(function() { 111 $(".header_alreadyLogin").show() 112 $(this).addClass("dislogin"); 113 }, function() { 114 $(".header_alreadyLogin").hide(); 115 $(this).removeClass("dislogin"); 116 }) 117 118 // éåºç»å½ 119 $('#btnLogout').on('click',function() { 120 $.ajax({
121 type: 'POST', 122 url: MYHAPI + "/api_logout.php", 123 xhrFields: { 124 withCredentials: true 125 }, 126 crossDomain: true, 127 success: function(data) { 128 location.reload(); 129 } 130 }); 131 }); 132}) 133 134$(document).on('click',"#btnSearch", function() { 135 var searchKey = $('#searchKey').val() 136 if(searchKey==''){ 137 showmessage('error','请è¾å ¥éè¦æç´¢çå 容ï¼'); 138 return false; 139 } 140 var regEn = /[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/im, 141 regCn = /[·ï¼#ï¿¥ï¼ââï¼ï¼ï¼âââãï¼|ãããï¼ããã[\]]/im; 142 143 if(regEn.test(searchKey) || regCn.test(searchKey)) { 144 showmessage('error','æç´¢å 容嫿鿳å符ï¼'); 145 return false; 146 } 147 window.location = MYHAPI +"/vue/services/search/?keyword=" +searchKey 148}) 149 150/***** å车é®ç¹å»æç´¢æé®start *****/ 151$('#searchKey').bind('keypress',function(event){ 152 if(event.keyCode == "13"){ 153 $('#btnSearch').click(); 154 return false; 155 } 156}); 157/***** å车é®ç¹å»æç´¢æé®end *****/
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.