mirror of
https://codeberg.org/vlw/honeypot.git
synced 2026-04-13 11:09:39 +02:00
13 lines
431 B
JavaScript
13 lines
431 B
JavaScript
// 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("/");
|
|
}
|