💄 Update config file & remove google translate.

This commit is contained in:
elkan1788
2025-01-25 11:15:11 +08:00
parent 60b14e65e9
commit f215616230
10 changed files with 56 additions and 32 deletions

View File

@@ -60,7 +60,10 @@ NexT.boot.registerEvents = function() {
NexT.boot.refresh = function() {
NexT.utils.fmtSiteInfo();
NexT.utils.registerLangSelect();
if (NexT.CONFIG.isMultiLang) {
NexT.utils.registerLangSelect();
}
if (!NexT.CONFIG.page.isPage) return;

View File

@@ -523,12 +523,11 @@ NexT.utils = {
optionsDom.style.opacity = '0';
optionsDom.style.transform = 'translateY(-10px)';
const currentUrl = window.location.href;
const newUrl = currentUrl.replace(/(\/[^\/]+)?(\/[^\/]+)?$/, `/${langCode}$1$2`);
let url = option.getAttribute('lang-url');
setTimeout(() => {
optionsDom.style.display = 'none';
window.location.href = newUrl;
window.location.href = url;
}, 300);
});
});