add filtering and sorting features; enhance events and articles pages with URL state persistence

This commit is contained in:
ImBenji
2026-04-23 23:03:11 +01:00
parent bec6763191
commit 194442ec4c
8 changed files with 274 additions and 16 deletions
+10
View File
@@ -63,6 +63,16 @@ async function runSql() {
document.addEventListener("DOMContentLoaded", () => {
// restore selected db from url
const urlDb = queryGet("db");
if (urlDb === "archive" || urlDb === "intelligence") {
document.getElementById("sql-db").value = urlDb;
}
document.getElementById("sql-db").addEventListener("change", ev => {
queryWrite({ db: ev.target.value === "archive" ? "" : ev.target.value });
});
document.getElementById("sql-run-btn").onclick = runSql;
document.getElementById("sql-input").addEventListener("keydown", e => {