ui:ADD pad_id to tab name in browser #36

This commit is contained in:
Caffeine Fueled 2026-09-04 10:15:20 +02:00
parent dba602e698
commit e8aaceb86c
Signed by: cf7
GPG key ID: CA295D643074C68C

3
app.py
View file

@ -465,6 +465,9 @@ let docId = decodeURIComponent(location.pathname.replace(/(^\\/|\\/$)/g, ""));
if (!docId) { location.replace("/" + rand() + "/"); } if (!docId) { location.replace("/" + rand() + "/"); }
$("#padname").textContent = "/"+docId+"/"; $("#padname").textContent = "/"+docId+"/";
// Set client-side rather than server-side: the pad page is one shared HTML constant,
// so interpolating per request would mean rebuilding it on every hit.
document.title = docId + " - aukpad";
let ws, ver = 0, clientId = Math.random().toString(36).slice(2), debounce; let ws, ver = 0, clientId = Math.random().toString(36).slice(2), debounce;
let isProtected = false, isAuthed = false; let isProtected = false, isAuthed = false;