aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/js/fixedsearch.ts2
-rw-r--r--static/js/update.ts2
2 files changed, 4 insertions, 0 deletions
diff --git a/static/js/fixedsearch.ts b/static/js/fixedsearch.ts
index 01dd917..f933dd7 100644
--- a/static/js/fixedsearch.ts
+++ b/static/js/fixedsearch.ts
@@ -42,6 +42,8 @@
let selected;
+ if (submit === null) return;
+
submit.addEventListener("click", function (event) {
if (selected) {
event.preventDefault();
diff --git a/static/js/update.ts b/static/js/update.ts
index 94a509a..27b13b5 100644
--- a/static/js/update.ts
+++ b/static/js/update.ts
@@ -20,7 +20,9 @@
const remote = request.getResponseHeader("last-modified") || '';
const modified = Date.parse(document.lastModified) !== Date.parse(remote);
const drift = Date.parse(remote || local) - Date.parse(local);
+
let indicator = document.querySelector("a[data-update]");
+ if (indicator === null) return;
const anchor = indicator.cloneNode();
function reset() {