From a97a90d85102d7227f584a076b15cbf16f53ddeb Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Fri, 9 Aug 2019 17:53:43 +0100 Subject: [PATCH] First build for prerelease # Conflicts: # package.json Former-commit-id: 419ac7b0f1dce91e5a12ac166b36f94bea6cb317 [formerly ff74169f4f5c64764147123d72755a843cf232d8] Former-commit-id: a169f163ae2e3f5c592447bc21781321104c3e7c --- www/js/app.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/www/js/app.js b/www/js/app.js index 07b6c3d3..a577ae94 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -578,7 +578,6 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'images', 'cooki // Top menu : document.getElementById('btnHome').addEventListener('click', function () { setTab('btnHome'); - //$('#articleContent').hide(); $('#articleContent').contents().empty(); $('#searchingArticles').hide(); $('#welcomeText').show(); @@ -649,7 +648,9 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'images', 'cooki $('#about').hide(); $('#configuration').hide(); $('#formArticleSearch').show(); - if (!activeBtn || activeBtn == 'btnHome') $('#articleContent').show(); + if (!activeBtn || activeBtn == 'btnHome') { + document.getElementById('articleContent').style.display = 'block'; + } $("#articleList").empty(); $('#articleListHeaderMessage').empty(); $('#articleListWithHeader').hide(); @@ -2834,6 +2835,9 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'images', 'cooki $('#downloadAlert').hide(); var iframeArticleContent = document.getElementById('articleContent'); + + // Hide the iframe while loading + iframeArticleContent.style.display = 'none'; if (params.contentInjectionMode === 'serviceworker') { params.transformedHTML = htmlArticle; @@ -3079,9 +3083,6 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'images', 'cooki articleContent.write(htmlArticle); articleContent.close(); - // Hide the iframe while loading - iframeArticleContent.style.display = 'none'; - } // End of injectHtml function insertMediaBlobsJQuery() {