diff --git a/www/js/app.js b/www/js/app.js index 8880e324..a9c05ad9 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -1352,7 +1352,7 @@ archiveFilesLegacy.addEventListener('change', function (files) { }).catch(function (err) { console.error('Unable to import files to OPFS!', err); var message = '

We could not import the selected files to the OPFS!

Reason: ' + err.message + '

'; - if (/iOS/.test(params.appType)) message = '

Unfortunately, iOS does not currently support importing files into the OPFS. Please disable the OPFS and use other file selection options.

Error message: ' + err.message + '

'; + if (/iOS/.test(params.appType) || /^((?!chrome|android).)*safari/i.test(navigator.userAgent)) message = '

Unfortunately, Safari and iOS browsers do not currently support importing files into the OPFS. Please disable the OPFS and use other file selection options.

Error message: ' + err.message + '

'; uiUtil.systemAlert(message, 'OPFS import error'); uiUtil.pollOpsPanel(); }); diff --git a/www/js/lib/kiwixServe.js b/www/js/lib/kiwixServe.js index ab118a9c..ed705b30 100644 --- a/www/js/lib/kiwixServe.js +++ b/www/js/lib/kiwixServe.js @@ -628,7 +628,7 @@ function requestXhttpData (URL, lang, subj, kiwixDate) { downloadSize = 0; percentageComplete = 0; var message = 'Unable to download the archive ' + archiveName + ' to your device: ' + err; - if (/iOS/.test(params.appType)) message = '

Unfortunately, iOS does not currently support downloading files directly into the OPFS. Please select a different download method.

Error message: ' + err.message + '

'; + if (/iOS/.test(params.appType) || /^((?!chrome|android).)*safari/i.test(navigator.userAgent)) message = '

Unfortunately, Safari and iOS browsers do not currently support downloading files directly into the OPFS. Please select a different download method.

Error message: ' + err.message + '

'; return uiUtil.systemAlert(message, 'Download failed'); }); }