💄 Update config file & remove google translate.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user