mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-25 20:44:01 -04:00
Include Safari in messages about lack of OPFS support
This commit is contained in:
parent
367bdff07d
commit
da686212f0
@ -1352,7 +1352,7 @@ archiveFilesLegacy.addEventListener('change', function (files) {
|
||||
}).catch(function (err) {
|
||||
console.error('Unable to import files to OPFS!', err);
|
||||
var message = '<p>We could not import the selected files to the OPFS!</p><p>Reason: ' + err.message + '</p>';
|
||||
if (/iOS/.test(params.appType)) message = '<p>Unfortunately, iOS does not currently support importing files into the OPFS. Please disable the OPFS and use other file selection options.</p><p>Error message: ' + err.message + '</p>';
|
||||
if (/iOS/.test(params.appType) || /^((?!chrome|android).)*safari/i.test(navigator.userAgent)) message = '<p>Unfortunately, Safari and iOS browsers do not currently support importing files into the OPFS. Please disable the OPFS and use other file selection options.</p><p>Error message: ' + err.message + '</p>';
|
||||
uiUtil.systemAlert(message, 'OPFS import error');
|
||||
uiUtil.pollOpsPanel();
|
||||
});
|
||||
|
@ -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 = '<p>Unfortunately, iOS does not currently support downloading files directly into the OPFS. Please select a different download method.</p><p>Error message: ' + err.message + '</p>';
|
||||
if (/iOS/.test(params.appType) || /^((?!chrome|android).)*safari/i.test(navigator.userAgent)) message = '<p>Unfortunately, Safari and iOS browsers do not currently support downloading files directly into the OPFS. Please select a different download method.</p><p>Error message: ' + err.message + '</p>';
|
||||
return uiUtil.systemAlert(message, 'Download failed');
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user