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
- allPost2025.01.31Meet the Press NOW – Jan. 30
- allPost2025.01.31Trump’s speculation on plane crash is ‘reckless,’ says Kansas lawmaker
- allPost2025.01.31Homeland Security Committee Chairman: ‘NTSB will get to the bottom’ of Potomac collision
- allPost2025.01.30Former NTSB safety investigator says staff shortages are a ‘recurrent theme’ in plane accidents