USTravelDocs { const pathList = location.pathname.split(‘/’).filter(v => v); console.log(pathList) const base = document.querySelector(“#base”); base.href = ‘/’ + pathList[0] + ‘/’ + pathList[1] + ‘/’; if (pathList.length === 2) pathList.push(“index-page”); const html = document.querySelector(“html”); let redirectPath = “”; if (pathList[0] == “sg” && (pathList[1] == ‘ZT’ || pathList[1] == ‘zt’)) { redirectPath = “/”+pathList[0]+”/zh/”; } if(pathList[0]?.length == 5) { let countryCode = pathList[0].split(“_”); if (countryCode[1] ==’jp’) { redirectPath = “/”+countryCode[0]+”/ja/”; } else if (countryCode[1] ==’kr’) { redirectPath = “/”+countryCode[0]+”/ko/”; } else if (countryCode[0] ==’sg’ && countryCode[1] ==’zt’) { redirectPath = “/”+countryCode[0]+”/zh/”; } else { if(countryCode[1].length == 2) { redirectPath = “/”+countryCode[0]+”/”+countryCode[1]+”/”; } else { redirectPath = “/”+countryCode[0]+”/en/”; } } } if(pathList[0]?.length == 2 && pathList[1]?.length != 2) { redirectPath = “/”+pathList[0]+”/en/”; } if(pathList[0]?.length == 2 && (!pathList[1] || pathList[1] == “”)) { redirectPath = “/”+pathList[0]+”/en/”; } if(redirectPath != “”) { window.location.href = redirectPath; } pathList[1] = pathList[1]?pathList[1]:’en’; html.lang = pathList[1]; html.classList.add(…pathList); })();]]>We’re sorry but ustraveldocs doesn’t work properly without JavaScript enabled. Please enable it to continue.
Source
Try Adsterra Earnings, it’s 100% Authentic to make money more and more.
Published By
Latest entries
- allPost2024.11.21
- allPost2024.11.21What’s A casino poker Extension Bet?
- allPost2024.11.212024 Nfl International Series Schedule
- allPost2024.11.21Bet Your lifetime