diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java index dc929bca03..8a68a226d5 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java @@ -49,7 +49,20 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen "\n" + "\n" + "
\n" + ""; + "window.location.hash = id;}" + + "var coll = document.getElementsByTagName(\"H2\");" + + "var i;" + + "for (i = 0; i < coll.length; i++) {" + + " coll[i].addEventListener(\"click\", function() {" + + " this.classList.toggle(\"active\");" + + " var content = this.nextElementSibling;" + + " if (content.style.display === \"block\") {" + + " content.style.display = \"none\";" + + " } else {" + + " content.style.display = \"block\";" + + " }" + + " });" + + "}"; private static final String FOOTER_INNER = "