aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-05-04 12:03:40 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-05-04 12:03:40 +0200
commit8c01aac1a65aa05029ae7d9a4751ab25f886da66 (patch)
treeb49c68ea6a713ff7e38086051301ea33b0ffd268
parentWeeknumber hopefully counts correctly now. (diff)
downloadcalp-8c01aac1a65aa05029ae7d9a4751ab25f886da66.tar.gz
calp-8c01aac1a65aa05029ae7d9a4751ab25f886da66.tar.xz
Re-add removal of href on event with js.
-rw-r--r--static/script.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/static/script.js b/static/script.js
index 579f4980..a172a94f 100644
--- a/static/script.js
+++ b/static/script.js
@@ -186,6 +186,15 @@ window.onload = function () {
}
}
+ /* Popup script replaces need for anchors to events.
+ On mobile they also have the problem that they make
+ the whole page scroll there.
+ */
+ for (let el of document.getElementsByClassName("event")) {
+ el.parentElement.removeAttribute("href");
+
+ }
+
document.onkeydown = function (evt) {
evt = evt || window.event;
if (! evt.key) return;