From bcc65285ae9184afacb6ef7fa94c18161cf93e39 Mon Sep 17 00:00:00 2001 From: M-a-r-i-a-n-n-e <79865516+M-a-r-i-a-n-n-e@users.noreply.github.com> Date: Wed, 3 Mar 2021 09:13:26 +0100 Subject: [PATCH] Workaround for Ideal Image Slider captions Remove double captions, cf. https://github.com/openbikesensor/openbikesensor.github.io/issues/43 --- assets/js/slider/iis-captions.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/js/slider/iis-captions.js b/assets/js/slider/iis-captions.js index da318a68..c6baecf4 100644 --- a/assets/js/slider/iis-captions.js +++ b/assets/js/slider/iis-captions.js @@ -19,9 +19,10 @@ IIS._addClass(caption, 'iis-caption'); var captionContent = ''; - if (slide.getAttribute('title')) { + // commenting out the following lines as a workaround, because they produce a caption from the "alt"-attribute and the lines after add an image description, also with the same text from the "alt"-attribute, whereas the "title" attribute does not seem to get parsed at all: + /* if (slide.getAttribute('title')) { captionContent += '
' + slide.getAttribute('title') + '
'; - } + } */ if (slide.getAttribute('data-caption')) { var dataCaption = slide.getAttribute('data-caption'); if (dataCaption.substring(0, 1) == '#' || dataCaption.substring(0, 1) == '.') { @@ -48,4 +49,4 @@ return IIS; -})(IdealImageSlider); \ No newline at end of file +})(IdealImageSlider);