// Set a generous global navigation delay to simulate crappy web software
VV.delay = 300;

if (globalThis.dlink.loggedin) {
	document.body.querySelector("header .profile > div").classList.add("active");
}

// Redirect the user to the login page if session storage key is not set
if (!globalThis.dlink.loggedin && window.location.pathname !== globalThis.dlink.LOGIN_PAGE) {
	const vv = new VV();
	vv.delay = 0;
	vv.navigate("/");
}
