diff --git a/www/js/app.js b/www/js/app.js index 10fb0c02..1c46cfd4 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -2001,9 +2001,11 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module' * @param {String} htmlArticle */ function displayArticleInForm(dirEntry, htmlArticle) { - // Remove any download alerts hanging on from previous article - var downloadAlert = document.getElementById('downloadAlert'); - if (downloadAlert) downloadAlert.parentElement.removeChild(downloadAlert); + // Remove any download alerts and active content hanging on from previous article + ['activeContent', 'downloadAlert'].forEach(function (id) { + var rmv = document.getElementById(id); + if (rmv) rmv.parentElement.removeChild(rmv); + }); //@BUG WORKAROUND for Kiwix-JS-Windows #18 htmlArticle = htmlArticle.replace(/(]*?\bhref\s*=\s*["'])(s\/[\s\S]+(?!\.css))(["'])/gi, "$1../-/$2.css$3");