1$(function () { 2 function _setActiveItem() { 3 const path = decodeURIComponent(window.location.pathname.replace(/\/$/, "")); 4 5 $(".account-menu-item").each(function () { 6 const href = $(this).attr("href"); 7 if (path === href) { 8 $(this).addClass("active"); 9 } 10 }); 11 12 $(".account-menu-item.active").closest(".account-menu-dropdown").addClass("show"); 13 14 if ($(".account-menu-dropdown").hasClass("show")) { 15 $(".account-menu-item-settings").addClass("active"); 16 } 17 18 if ($(".menu-dropdown").length) { 19 $(".menu-dropdown > .account-menu-item").html($(".account-menu-item.active:last").html()); 20 } 21 } 22 23 $(".account-menu-dropdown > .account-menu-item").click(function (e) { 24 e.preventDefault(); 25 $(this).closest(".account-menu-dropdown").toggleClass("show"); 26 $(this).toggleClass("active"); 27 }); 28 29 $(".menu-dropdown > .account-menu-item").click(function (e) { 30 e.preventDefault(); 31 e.stopPropagation(); 32 $(this).closest(".menu-dropdown").toggleClass("show"); 33 }); 34 35 $(".menu-dropdown-body").click(function (e) { 36 e.stopPropagation(); 37 }); 38 39 $(document).on("click", function () { 40 $(".menu-dropdown").removeClass("show"); 41 }); 42 43 _setActiveItem(); 44});
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.