Add missing replayWorker.js

This commit is contained in:
Jaifroid 2023-12-18 18:20:01 +00:00
parent cdc7fffb06
commit ad8c8de92d
3 changed files with 11 additions and 5 deletions

View File

@ -52,7 +52,7 @@
"asar": "false",
"extraResources": {
"from": "archives",
"to": "app/archives"
"to": "archives"
},
"fileAssociations": [
{
@ -111,6 +111,7 @@
"CHANGELOG.md",
"LICENCE",
"manifest.json",
"replayWorker.js",
"www/**",
"preload.cjs",
"main.cjs",

View File

@ -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.
var archiveFilePath = params.storedFilePath;
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 (/\/app.asar\//.test(document.location.href) && !/^\.\.[\\/]/.test(params.archivePath)) params.archivePath = '../' + params.archivePath;
// 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) || window.fs && document.location.protocol === 'http:')) {
params.archivePath = params.archivePath.replace(/^(?:resources\/)?/, 'resources/');
}
archiveFilePath = params.archivePath + '/' + params.packagedFile;
if (~params.storedFilePath.indexOf(archiveFilePath)) {
params.storedFilePath = archiveFilePath;
@ -4110,8 +4112,10 @@ function loadPackagedArchive () {
settingsStore.removeItem('lastSelectedArchivePath');
params.lastPageVisit = '';
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 (/\/app.asar\//.test(document.location.href) && !/^\.\.[\\/]/.test(params.archivePath)) params.archivePath = '../' + params.archivePath;
// 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) || window.fs && document.location.protocol === 'http:')) {
params.archivePath = params.archivePath.replace(/^(?:resources\/)?/, 'resources/');
}
readNodeDirectoryAndCreateNodeFileObjects(params.archivePath, params.packagedFile).then(function (fileset) {
var fileObjects = fileset[0], fileNames = fileset[1];
// params.pickedFile = params.packagedFile;

View File

@ -81,6 +81,7 @@ let scrollThrottle = false;
* Luuncher for the slide-away function, including a throttle to prevent it being called too often
*/
function scroller (e) {
if (!e) return;
if (scrollThrottle || params.hideToolbars === false) return;
// We have to refresh the articleContainer when the window changes
articleContainer = document.getElementById('articleContent');