view website/src/site.js @ 2091:ee7e711a91f2 ssltesting

fix inconsistent usage of DOMAIN/.well-known/acme-challenge and DOMAIN/acme-challenge
author Violet7
date Thu, 11 Dec 2025 20:33:51 -0800
parents 31f006c64782
children
line wrap: on
line source

'use strict';

function setLanguage(lang) {
	console.log(lang);
	let path = location.pathname;
	if( path.match(/^\/[a-z]{2}\//) )
		path = path.substring(3);
	if( lang !== 'en' )
		path = "/" + lang + path;
	location = path;
}