From 8d72169bbd5fef9a2c857b906ef74bac485010a5 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 30 Dec 2021 19:48:47 -0800 Subject: [PATCH] Don't do fancy javascript clicks on the notification page --- bookwyrm/static/js/block_href.js | 21 ------------------- .../notifications/items/item_layout.html | 10 ++++++--- .../notifications/notifications_page.html | 4 ---- 3 files changed, 7 insertions(+), 28 deletions(-) delete mode 100644 bookwyrm/static/js/block_href.js diff --git a/bookwyrm/static/js/block_href.js b/bookwyrm/static/js/block_href.js deleted file mode 100644 index ac10b6deb..000000000 --- a/bookwyrm/static/js/block_href.js +++ /dev/null @@ -1,21 +0,0 @@ -/* exported BlockHref */ - -let BlockHref = new (class { - constructor() { - document - .querySelectorAll("[data-href]") - .forEach((t) => t.addEventListener("click", this.followLink.bind(this))); - } - - /** - * Follow a fake link - * - * @param {Event} event - * @return {undefined} - */ - followLink(event) { - const url = event.currentTarget.dataset.href; - - window.location.href = url; - } -})(); diff --git a/bookwyrm/templates/notifications/items/item_layout.html b/bookwyrm/templates/notifications/items/item_layout.html index 8db68dafb..506bda8dd 100644 --- a/bookwyrm/templates/notifications/items/item_layout.html +++ b/bookwyrm/templates/notifications/items/item_layout.html @@ -1,12 +1,15 @@ {% load bookwyrm_tags %} {% related_status notification as related_status %} -
+