diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java index 2a54cbf3e1..b12b7803e2 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java @@ -73,7 +73,19 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen " content.style.display = \"block\";" + " }" + " });" + - "}" + "function scrollAnchor(id, title) {" + + "}" + + "document.addEventListener(\"DOMContentLoaded\", function(event) {\n" + + " document.querySelectorAll('img').forEach(function(img) {\n" + + " img.onerror = function() {\n" + + " this.style.display = 'none';\n" + + " var caption = img.parentElement.nextElementSibling;\n" + + " if (caption.className == \"thumbnailcaption\") {\n" + + " caption.style.display = 'none';\n" + + " }\n" + + " };\n" + + " })\n" + + "});" + + "function scrollAnchor(id, title) {" + "openContent(title);" + "window.location.hash = id;}\n" + "function openContent(id) {\n" +