aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2024-02-24 18:33:47 -0500
committertdro <tdro@noreply.example.com>2024-02-24 18:33:47 -0500
commite68fb9110dde654d5a830a110d20694352b6eaca (patch)
tree607b3040d0e85d5a8bba444fdd6890cf39006ebe /assets
parent0681f6d1d7cff09835bb9ade250fbb490e3ede28 (diff)
downloadcanory-e68fb9110dde654d5a830a110d20694352b6eaca.tar.gz
canory-e68fb9110dde654d5a830a110d20694352b6eaca.tar.bz2
canory-e68fb9110dde654d5a830a110d20694352b6eaca.zip
themes/default/layouts/_default/home.xslt: Add scripts
Diffstat (limited to 'assets')
-rw-r--r--assets/js/index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/assets/js/index.js b/assets/js/index.js
index e1526d8..cc23d2c 100644
--- a/assets/js/index.js
+++ b/assets/js/index.js
@@ -118,6 +118,7 @@
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;
indicator.cloneNode();
if (drift === 0) return;
if (remote && modified) {
@@ -422,6 +423,7 @@
}));
}
let selected;
+ if (submit === null) return;
submit.addEventListener("click", function(event) {
if (selected) {
event.preventDefault();