mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-11 13:18:21 -04:00
Add missing replayWorker.js
This commit is contained in:
parent
cdc7fffb06
commit
ad8c8de92d
@ -52,7 +52,7 @@
|
|||||||
"asar": "false",
|
"asar": "false",
|
||||||
"extraResources": {
|
"extraResources": {
|
||||||
"from": "archives",
|
"from": "archives",
|
||||||
"to": "app/archives"
|
"to": "archives"
|
||||||
},
|
},
|
||||||
"fileAssociations": [
|
"fileAssociations": [
|
||||||
{
|
{
|
||||||
@ -111,6 +111,7 @@
|
|||||||
"CHANGELOG.md",
|
"CHANGELOG.md",
|
||||||
"LICENCE",
|
"LICENCE",
|
||||||
"manifest.json",
|
"manifest.json",
|
||||||
|
"replayWorker.js",
|
||||||
"www/**",
|
"www/**",
|
||||||
"preload.cjs",
|
"preload.cjs",
|
||||||
"main.cjs",
|
"main.cjs",
|
||||||
|
@ -3155,8 +3155,10 @@ if (storages !== null && storages.length > 0 ||
|
|||||||
// because a new path is established each time the image's filesystem is mounted. So we reset to default.
|
// because a new path is established each time the image's filesystem is mounted. So we reset to default.
|
||||||
var archiveFilePath = params.storedFilePath;
|
var archiveFilePath = params.storedFilePath;
|
||||||
if (params.storedFile === params.packagedFile) {
|
if (params.storedFile === params.packagedFile) {
|
||||||
// If the app is packed inside an asar archive, we need to alter the archivePath to point outside the asar directory
|
// If the app is packed inside an asar archive, or is Electron running from localhost, we need to alter the archivePath to point outside the asar directory
|
||||||
if (/\/app.asar\//.test(document.location.href) && !/^\.\.[\\/]/.test(params.archivePath)) params.archivePath = '../' + params.archivePath;
|
if ((/\/app.asar\//.test(document.location.href) || window.fs && document.location.protocol === 'http:')) {
|
||||||
|
params.archivePath = params.archivePath.replace(/^(?:resources\/)?/, 'resources/');
|
||||||
|
}
|
||||||
archiveFilePath = params.archivePath + '/' + params.packagedFile;
|
archiveFilePath = params.archivePath + '/' + params.packagedFile;
|
||||||
if (~params.storedFilePath.indexOf(archiveFilePath)) {
|
if (~params.storedFilePath.indexOf(archiveFilePath)) {
|
||||||
params.storedFilePath = archiveFilePath;
|
params.storedFilePath = archiveFilePath;
|
||||||
@ -4110,8 +4112,10 @@ function loadPackagedArchive () {
|
|||||||
settingsStore.removeItem('lastSelectedArchivePath');
|
settingsStore.removeItem('lastSelectedArchivePath');
|
||||||
params.lastPageVisit = '';
|
params.lastPageVisit = '';
|
||||||
if (params.packagedFile && params.storedFile !== params.packagedFile) {
|
if (params.packagedFile && params.storedFile !== params.packagedFile) {
|
||||||
// If the app is packed inside an asar archive, we need to alter the archivePath to point outside the asar directory
|
// If the app is packed inside an asar archive, or is Electron running from localhost we need to alter the archivePath to point outside the asar directory
|
||||||
if (/\/app.asar\//.test(document.location.href) && !/^\.\.[\\/]/.test(params.archivePath)) params.archivePath = '../' + params.archivePath;
|
if ((/\/app.asar\//.test(document.location.href) || window.fs && document.location.protocol === 'http:')) {
|
||||||
|
params.archivePath = params.archivePath.replace(/^(?:resources\/)?/, 'resources/');
|
||||||
|
}
|
||||||
readNodeDirectoryAndCreateNodeFileObjects(params.archivePath, params.packagedFile).then(function (fileset) {
|
readNodeDirectoryAndCreateNodeFileObjects(params.archivePath, params.packagedFile).then(function (fileset) {
|
||||||
var fileObjects = fileset[0], fileNames = fileset[1];
|
var fileObjects = fileset[0], fileNames = fileset[1];
|
||||||
// params.pickedFile = params.packagedFile;
|
// params.pickedFile = params.packagedFile;
|
||||||
|
@ -81,6 +81,7 @@ let scrollThrottle = false;
|
|||||||
* Luuncher for the slide-away function, including a throttle to prevent it being called too often
|
* Luuncher for the slide-away function, including a throttle to prevent it being called too often
|
||||||
*/
|
*/
|
||||||
function scroller (e) {
|
function scroller (e) {
|
||||||
|
if (!e) return;
|
||||||
if (scrollThrottle || params.hideToolbars === false) return;
|
if (scrollThrottle || params.hideToolbars === false) return;
|
||||||
// We have to refresh the articleContainer when the window changes
|
// We have to refresh the articleContainer when the window changes
|
||||||
articleContainer = document.getElementById('articleContent');
|
articleContainer = document.getElementById('articleContent');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user