feat: check for password existence

This commit is contained in:
insects 2025-03-11 01:12:30 +01:00
parent b03df8f0e4
commit 498ecdf68b
7 changed files with 73 additions and 15 deletions

View file

@ -0,0 +1,12 @@
const id = document.getElementById("public_id");
const pwd = document.getElementById("password");
const ls = window.localStorage;
if (id && pwd) {
ls.setItem(`ecoffee-pwd:${id.dataset.content}`, pwd.dataset.content);
}
let loc = new URL(window.location.href);
loc.search = "";
loc.pathname = `/${id.dataset.content}`;
window.location = loc;