1 2$(document).ready(function () { 3 //img lazy loaded 4 const observer = lozad(); 5 observer.observe(); 6 7 $(document).on('click', '.has-sub', function () { 8 var _this = $(this) 9 if (!$(this).hasClass('expanded')) { 10 setTimeout(function () { 11 _this.find('ul').attr("style", "") 12 }, 300); 13 14 } else { 15 $('.has-sub ul').each(function (id, ele) { 16 var _that = $(this) 17 if (_this.find('ul')[0] != ele) { 18 setTimeout(function () { 19 _that.attr("style", "") 20 }, 300); 21 } 22 }) 23 } 24 }) 25 $('.user-info-menu .hidden-sm').click(function () { 26 if ($('.sidebar-menu').hasClass('collapsed')) { 27 $('.has-sub.expanded > ul').attr("style", "") 28 } else { 29 $('.has-sub.expanded > ul').show() 30 } 31 }) 32 $("#main-menu li ul li").click(function () { 33 $(this).siblings('li').removeClass('active'); // å é¤å ¶ä»å å¼å ç´ çæ ·å¼ 34 $(this).addClass('active'); // æ·»å å½åå ç´ çæ ·å¼ 35 }); 36 $("a.smooth").click(function (ev) { 37 ev.preventDefault(); 38 39 public_vars.$mainMenu.add(public_vars.$sidebarProfile).toggleClass('mobile-is-visible'); 40 ps_destroy(); 41 $("html, body").animate({ 42 scrollTop: $($(this).attr("href")).offset().top - 30 43 }, { 44 duration: 500, 45 easing: "swing" 46 }); 47 }); 48 return false; 49}); 50 51var href = ""; 52var pos = 0; 53$("a.smooth").click(function (e) { 54 $("#main-menu li").each(function () { 55 $(this).removeClass("active"); 56 }); 57 $(this).parent("li").addClass("active"); 58 e.preventDefault(); 59 href = $(this).attr("href"); 60 pos = $(href).position().top - 30; 61}); 62(function () { 63 if (document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") === '') { 64 if (new Date().getHours() > 22 || new Date().getHours() < 6) { 65 document.body.classList.add('night'); 66 document.cookie = "night=1;path=/"; 67 console.log('å¤é´æ¨¡å¼å¼å¯'); 68 } else { 69 document.body.classList.remove('night'); 70 document.cookie = "night=0;path=/"; 71 console.log('å¤é´æ¨¡å¼å ³é'); 72 } 73 } else { 74 var night = document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") || '0'; 75 if (night == '0') { 76 document.body.classList.remove('night'); 77 } else if (night == '1') { 78 document.body.classList.add('night'); 79 } 80 } 81})();
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.