mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-22 12:01:15 -04:00
parent
946db1bd00
commit
7e8ce16ce7
@ -1316,6 +1316,7 @@ if ($.isFunction(navigator.getDeviceStorages)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// @AUTOLOAD of archives starts here for frameworks or APIs that allow it
|
// @AUTOLOAD of archives starts here for frameworks or APIs that allow it
|
||||||
|
var willJumpToRemoteExtension = params.contentInjectionMode === 'serviceworker' && navigator.serviceWorker && /^(moz|chrome)-extension/.test(window.location.protocol) && localStorage.getItem(params.keyPrefix + 'PWA_launch') === 'success';
|
||||||
|
|
||||||
// If DeviceStorage is available (Firefox OS), we look for archives in it
|
// If DeviceStorage is available (Firefox OS), we look for archives in it
|
||||||
if (storages !== null && storages.length > 0) {
|
if (storages !== null && storages.length > 0) {
|
||||||
@ -1332,10 +1333,12 @@ if (storages !== null && storages.length > 0) {
|
|||||||
setLocalArchiveFromFileList(files);
|
setLocalArchiveFromFileList(files);
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
console.warn(err);
|
console.warn(err);
|
||||||
document.getElementById('btnConfigure').click();
|
if (!willJumpToRemoteExtension) {
|
||||||
|
document.getElementById('btnConfigure').click();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// If no autoload API is available, we display the file select dialog
|
// If no autoload API is available and we're not about to jump to the remote extension, we display the file select dialog
|
||||||
} else {
|
} else if (!willJumpToRemoteExtension) {
|
||||||
displayFileSelect();
|
displayFileSelect();
|
||||||
if (archiveFiles.files && archiveFiles.files.length > 0) {
|
if (archiveFiles.files && archiveFiles.files.length > 0) {
|
||||||
// Archive files are already selected,
|
// Archive files are already selected,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user