From ebbb5ea48c3a4b1ae8d0cf4b0312e9e0b6356c43 Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Tue, 5 Dec 2023 07:39:53 +0000 Subject: [PATCH] Simpliified noPackagedZIM test --- www/index.html | 2 +- www/js/app.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/www/index.html b/www/index.html index de1bd465..4df24b1f 100644 --- a/www/index.html +++ b/www/index.html @@ -90,7 +90,7 @@ Kiwix gives no guarantee as to the accuracy of information in the archives you access with this app.

-

+

IMPORTANT: To use this app, you must download an offline ZIM archive and store it on your device! You can do this from the Configuration page , or else see the About page  for more information. diff --git a/www/js/app.js b/www/js/app.js index 0f575918..87b1f27a 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -2512,6 +2512,10 @@ document.addEventListener('DOMContentLoaded', function () { if (result === false) console.log('Unable to delete old idxDB databases (this is normal in non-Chromium browsers'); else console.log('Deleted ' + result + ' deprecated database(s).'); }); + var noPackagedZIM = document.getElementById('noPackagedZIM'); + if (params.packagedFile && /medicine|wikivoyage|mdwiki/i.test(params.packagedFile)) { + noPackagedZIM.style.display = 'none'; + } // On some platforms, bootstrap's jQuery functions have not been injected yet, so we have to run in a timeout setTimeout(function () { uiUtil.systemAlert(' ', '', false, null, null, null, 'myModal').then(function () {