From e374030f8b981591dcb255601d72fb988c8b580d Mon Sep 17 00:00:00 2001 From: grandeljay Date: Wed, 14 Dec 2022 14:52:02 +0100 Subject: [PATCH] Allow visiting wish link --- src/assets/js/parts/wish.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/assets/js/parts/wish.js b/src/assets/js/parts/wish.js index 38e1c187..474dbff3 100644 --- a/src/assets/js/parts/wish.js +++ b/src/assets/js/parts/wish.js @@ -1,4 +1,5 @@ const wish_button_mark_as_fulfilled = '.ui.button.wish-fulfilled'; +const wish_button_visit = '.ui.button.wish-visit'; var wish; @@ -6,6 +7,12 @@ function wish_set_to(wish_data) { wish = wish_data; $(wish_button_mark_as_fulfilled).removeClass('disabled'); + + if (wish.url) { + $(wish_button_visit) + .attr('href', wish.url) + .removeClass('disabled'); + } } function wish_unset() {