diff --git a/changelog.txt b/changelog.txt index b3dab01d..dc63215e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -10,6 +10,7 @@ Add La Opinion de Zamora Add RedaktionsNetzwerk Deutschland Fix Alma Talent sites (js-ads) Fix Australia News Corp (amp) +Fix Helsingin Sanomat (dynamic-json) Fix Madsack Mediengruppe Fix NzHerald diff --git a/contentScript.js b/contentScript.js index 99e63240..47982394 100644 --- a/contentScript.js +++ b/contentScript.js @@ -991,7 +991,7 @@ else if (matchDomain('hs.fi')) { img.setAttribute('style', 'width:468px !important'); elem.appendChild(img); caption = document.createElement('figcaption'); - caption_text = slide.split('text:')[1].split(',"text-style"')[0]; + caption_text = slide.includes('text:') ? slide.split('text:')[1].split(',"text-style"')[0] : slide.split('caption:')[1].split('",')[0]; if (caption_text.length) caption_text = caption_text.slice(1, caption_text.length - 1); par_html = parser.parseFromString('
' + DOMPurify.sanitize(caption_text) + '
', 'text/html');