Added Javascript to hide not working images
This commit is contained in:
parent
8292bda877
commit
2a615480df
1 changed files with 13 additions and 1 deletions
|
@ -73,7 +73,19 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen
|
||||||
" content.style.display = \"block\";" +
|
" 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);" +
|
"openContent(title);" +
|
||||||
"window.location.hash = id;}\n" +
|
"window.location.hash = id;}\n" +
|
||||||
"function openContent(id) {\n" +
|
"function openContent(id) {\n" +
|
||||||
|
|
Loading…
Reference in a new issue