Simpliified noPackagedZIM test

This commit is contained in:
Jaifroid 2023-12-05 07:39:53 +00:00
parent e95fbe3d03
commit ebbb5ea48c
2 changed files with 5 additions and 1 deletions

View File

@ -90,7 +90,7 @@
<strong>Kiwix gives no guarantee as to the accuracy of information in the archives you access with this app.</strong>
</p>
</div>
<p style="padding-top:10px;">
<p id="noPackagedZIM" style="padding-top:10px;">
<span><strong>IMPORTANT:</strong> To use this app, you <strong>must download an offline ZIM archive</strong> and store it on your device!</span>
You can do this from the <b>Configuration page&nbsp;<span class="glyphicon glyphicon-wrench"></span></b>, or else see the
<b>About page&nbsp;<span class="glyphicon glyphicon-info-sign"></span></b> for more information.

View File

@ -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 () {