From ebbef440540b362347346644d865860a8fd34b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Sun, 29 Dec 2019 17:53:58 +0100 Subject: [PATCH] Made image carousel (books) click-able --- www/data/javascript/ms_basic.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/data/javascript/ms_basic.js b/www/data/javascript/ms_basic.js index ab81e1f..4c81929 100644 --- a/www/data/javascript/ms_basic.js +++ b/www/data/javascript/ms_basic.js @@ -66,11 +66,13 @@ function imgcarousel_move(source, delta) { if (img.toLowerCase().endsWith('.webm')) { content.setAttribute('style', ''); + content.setAttribute('onclick', 'javascript:void()'); content.innerHTML = ''; } else { - content.setAttribute('style', 'background-image: url(' + img + ');'); + content.setAttribute('style', 'background-image: url(' + img + '); cursor: pointer;'); + content.setAttribute('onclick', 'javascript:window.open("' + img + '","_blank");'); content.innerHTML = ''; } }