1function getCurrentLanguage() { 2 console.log("getCurrentLanguage", window.cultureInfo.currentLang); 3 // let dd = abp.localization.localize('Pages.StoreThemes.VersionDescription', "PrincessFemininResource") 4} 5 6getCurrentLanguage(); 7 8function changeLanguage() { 9 let language = $("#language-selection").val(); 10 11 // Get current path and query string 12 let currentPath = window.location.pathname; 13 let currentSearch = window.location.search; 14 15 // Build the complete current URL for return 16 let currentPage = currentPath + currentSearch; 17 18 // URL encode the return URL 19 let encodedReturnUrl = encodeURIComponent(currentPage); 20 21 location.href = `${location.origin}/Abp/Languages/Switch?culture=${language}&uiCulture=${language}&returnUrl=${encodedReturnUrl}`; 22} 23 24const logout = { 25 async logoutAsync() { 26 await fetch("/Auth/Logout", { 27 method: "POST", 28 credentials: "include", 29 headers: { 30 "Content-Type": "application/json", 31 Accept: "text/plain", 32 '__tenant': window.tenantObj.currentTenantId, 33 // "Authorization": "Bearer " + localStorage.getItem("authToken"), 34 RequestVerificationToken: 35 document.querySelector('input[name="__RequestVerificationToken"]') 36 ?.value ?? "", 37 "X-Requested-With": "XMLHttpRequest", 38 }, 39 }) 40 .then(async (response) => { 41 if (!response.ok) throw new Error(ToastHelper.error(result.error.value || window.LocalizationKeys.InvalidLogin)); 42 const result = await response.json(); 43 if (result.success) { 44 window.location.href = 'home'; 45 } else { 46 ToastHelper.error(result.error.value || window.LocalizationKeys.InvalidLogin); 47 } 48 }) 49 .catch((error) => { 50 console.error(error); 51 ToastHelper.error(result.error.value || window.LocalizationKeys.InvalidLogin); 52 }); 53 }, 54}; 55 56 57 58// enhance navbar shown categories limited by 5 items 59document.addEventListener("DOMContentLoaded", function () { 60 const menu = document.getElementById("category-menu"); 61 62 // Only select the TOP-LEVEL menu items (direct children of #category-menu) 63 const items = menu.querySelectorAll(":scope > .menu-item:not(#more-categories)"); 64 65 const moreLi = document.getElementById("more-categories"); 66 const moreList = moreLi.querySelector(".menu-list"); 67 68 items.forEach((item, index) => { 69 if (index >= 5) { // show first 5, rest go under باÙÙ Ø§ÙØ£Ùسا٠70 moreList.appendChild(item); 71 moreLi.style.display = "block"; 72 } 73 }); 74 75 76 setTimeout(() => { 77 if ($(".tf-sw-top_bar").length > 0) { 78 var preview = $(".tf-sw-top_bar").data("preview"); 79 var tablet = $(".tf-sw-top_bar").data("tablet"); 80 var mobile = $(".tf-sw-top_bar").data("mobile"); 81 var spacingLg = $(".tf-sw-top_bar").data("space-lg"); 82 var spacingMd = $(".tf-sw-top_bar").data("space-md"); 83 var play = $(".tf-sw-top_bar").data("auto-play"); 84 var delay = $(".tf-sw-top_bar").data("delay"); 85 var perGroup = $(".tf-sw-top_bar").data("pagination"); 86 var perGroupMd = $(".tf-sw-top_bar").data("pagination-md") || perGroup; // fallback 87 var perGroupLg = $(".tf-sw-top_bar").data("pagination-lg") || perGroup; // fallback 88 89 var swiper = new Swiper(".tf-sw-top_bar", { 90 autoplay: { 91 delay: delay, 92 disableOnInteraction: false, 93 pauseOnMouseEnter: true, 94 }, 95 autoplay: play, 96 slidesPerView: mobile, 97 spaceBetween: spacingMd, 98 speed: 1000, 99 slidesPerGroup: perGroup, 100 centerInsufficientSlides: true, 101 breakpoints: { 102 768: { 103 slidesPerView: tablet, 104 spaceBetween: spacingLg, 105 slidesPerGroup: perGroupMd, 106 }, 107 1150: { 108 slidesPerView: preview, 109 spaceBetween: spacingLg, 110 slidesPerGroup: perGroupLg, 111 }, 112 }, 113 }); 114 } 115 }, 100); 116 117}); 118 119 120
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.