1// @ts-nocheck 2$(document).ready(function () { 3 // ç§»å¨ç«¯èå 4 $(".menu-btn,.mask").click(function () { 5 $(".menu, .menu-btn, .mask").toggleClass("on"); 6 }); 7 $('.menu .menu_list_more > a').click(function (e) { 8 e.preventDefault(); 9 $(this).siblings('ul').slideToggle() 10 $(this).parent('.menu_list_more').siblings().find('ul').slideUp() 11 }); 12 13 //è¿åé¡¶é¨ 14 function initBackToTop(options) { 15 if ($('#backtop').length) return; 16 $('body').append('<div id="backtop" class="backtop" title="è¿åé¡¶é¨"></div>'); 17 const settings = $.extend({ 18 selector: '#backtop', 19 offset: 400, 20 speed: 400, 21 }, options); 22 const $btn = $(settings.selector); 23 if (!$btn.length) return; 24 25 $(window).scroll(function () { 26 $(this).scrollTop() > settings.offset 27 ? $btn.fadeIn(300) 28 : $btn.fadeOut(300); 29 }); 30 31 $btn.off('click.backtop').on('click.backtop', function () { 32 $('html, body').stop(true).animate({ 33 scrollTop: 0 34 }, settings.speed); 35 }); 36 } 37 // initBackToTop(); 38 39 // æ£æµå¤é¾è·³è½¬ 40 function getSiteName() { 41 // ä»é¡µé¢æ 颿å 42 var pageTitle = document.title; 43 var siteName = ''; 44 45 // 常è§åå²ç¬¦æåç«ç¹å 46 if (pageTitle) { 47 // å°è¯ä»æ é¢ä¸æåç«ç¹åç§°ï¼å¸¸è§æ ¼å¼ï¼"页é¢åç§° - ç«ç¹åç§°"ï¼ 48 var titleParts = pageTitle.split(/\s*[-|]\s*/); 49 if (titleParts.length > 1) { 50 siteName = titleParts[titleParts.length - 1]; // åæåä¸ä¸ªé¨å 51 } else { 52 siteName = pageTitle; 53 } 54 55 // ç§»é¤å¯è½çå°¾ç¼ 56 siteName = siteName.replace(/é¦é¡µ|å®ç½|ç½ç«|鍿·|é¦é¡µ$/, '').trim(); 57 } 58 59 return siteName || 'å½åç½ç«'; 60 } 61 var currentSiteName = getSiteName(); 62 // $('a[href^="http"]').each(function () { 63 // var href = $(this).attr('href'); 64 // if (href.indexOf('183.95.190.187') == -1) { 65 // $(this).click(function (e) { 66 // e.preventDefault(); 67 // layui.layer.open({ 68 // title: false, 69 // type: 0, 70 // offset: '100px', 71 // id: 'wltz', 72 // content: '<div style="padding: 16px;font-size: 18px;">æ¨è®¿é®ç龿¥å³å°ç¦»å¼"' + currentSiteName + '鍿·ç½ç«" æ¯å¦ç»§ç»ï¼</div>', area: 'auto', 73 // shade: 0.8, 74 // skin: 'layer-wltz', 75 // move: false, 76 // resize: false, 77 // btn: ['ç»§ç»è®¿é®', 'æ¾å¼'], 78 // btn1: function (index, layero, that) { 79 // window.open(href) 80 // layui.layer.close(index); 81 // }, 82 // btn2: function (index, layero, that) { 83 // layui.layer.close(index); 84 // }, 85 // }); 86 // }); 87 // } 88 // }); 89 90 // tab忢-click 91 $('.tab_pane_click .tab li:not(.nohover)').click(function () { 92 $(this).addClass('cur').siblings().removeClass('cur') 93 $(this).parents('.tab_pane').find('.pane').children('div,ul').hide().eq($(this).index()).show() 94 var url = $(this).find('a').attr('href'); 95 $(this).parents('.tab_box').find('.more').attr('href', url) 96 }) 97 // tab忢-hover 98 $('.tab_pane_hover .tab li:not(.nohover)').mouseover(function () { 99 $(this).addClass('cur').siblings().removeClass('cur') 100 $(this).parents('.tab_pane').find('.pane').children('div,ul').hide().eq($(this).index()).show() 101 var url = $(this).find('a').attr('href'); 102 $(this).parents('.tab_box').find('.more').attr('href', url) 103 }) 104 // å¤çç§»å¨ç«¯å è½½æ´å¤ 105 function handleMobileLinks() { 106 var isMobileView = $(window).width() < 992; 107 $('.tab_pane_mobile .mobile_nolink').off('click').on('click', function (e) { 108 if (isMobileView) { 109 e.preventDefault(); 110 } 111 }); 112 } 113 handleMobileLinks(); 114 $(window).resize(handleMobileLinks); 115 116 // ä¾§è¾¹æ 117 $('.sidebar_menu li').each(function () { 118 const $menu = $(this); 119 const $subMenu = $menu.find('> .sub_menu'); 120 if ($subMenu.length) { 121 if ($subMenu.find('li').length === 0) { 122 $subMenu.remove(); 123 $menu.find('> a i').remove(); 124 } else { 125 $menu.addClass('has_child'); 126 } 127 if ($menu.hasClass('cur') || $menu.find('.cur').length > 0) { 128 $menu.addClass('toggled'); 129 } 130 } 131 }); 132 $('.sidebar_menu .has_child > a').click(function (e) { 133 e.preventDefault(); 134 const $menu = $(this).parent(); 135 $menu.toggleClass('toggled') 136 .siblings('.has_child').removeClass('toggled'); 137 }); 138 139 // 详æ 页 140 // æä½æ¡åºå® 141 function optionFixed() { 142 var st = $(document).scrollTop()
143 var gt = $('.article .article_content').offset().top; 144 st > gt ? $('.article .option').addClass('fixed') : $('.article .option').removeClass('fixed'); 145 $('.article .article_title2').text($('.article .article_title').text()); 146 } 147 // å¦ææ¡æ°å°äº1ï¼åéè 148 function hideLessThanOne(father) { 149 var links = $(father + ' li').length; 150 if (links < 1) { 151 $(father).hide(); 152 } 153 } 154 if ($('.article').length > 0) { 155 $(window).bind('load scroll resize', optionFixed); 156 hideLessThanOne('.article_appendix') 157 hideLessThanOne('.article_zhengce') 158 hideLessThanOne('.article_jiedu') 159 hideLessThanOne('.article_links') 160 } 161});
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.