|
|
@@ -28,7 +28,7 @@ this.singlefile.extension.core.content.main = this.singlefile.extension.core.con
|
|
|
const singlefile = this.singlefile;
|
|
|
const MOZ_EXTENSION_PROTOCOL = "moz-extension:";
|
|
|
|
|
|
- let ui, processing = false, processor;
|
|
|
+ let ui, processor;
|
|
|
|
|
|
singlefile.lib.main.init({
|
|
|
fetch: singlefile.extension.lib.fetch.content.resources.fetch,
|
|
|
@@ -68,7 +68,7 @@ this.singlefile.extension.core.content.main = this.singlefile.extension.core.con
|
|
|
|
|
|
async function savePage(message) {
|
|
|
const options = message.options;
|
|
|
- if (!processing) {
|
|
|
+ if (!singlefile.extension.core.processing) {
|
|
|
options.updatedResources = singlefile.extension.core.content.updatedResources || {};
|
|
|
Object.keys(options.updatedResources).forEach(url => options.updatedResources[url].retrieved = false);
|
|
|
let selectionFound;
|
|
|
@@ -79,7 +79,7 @@ this.singlefile.extension.core.content.main = this.singlefile.extension.core.con
|
|
|
options.selected = true;
|
|
|
}
|
|
|
if (!options.selected || selectionFound) {
|
|
|
- processing = true;
|
|
|
+ singlefile.extension.core.processing = true;
|
|
|
try {
|
|
|
const pageData = await processPage(options);
|
|
|
if (pageData) {
|
|
|
@@ -97,7 +97,7 @@ this.singlefile.extension.core.content.main = this.singlefile.extension.core.con
|
|
|
} else {
|
|
|
browser.runtime.sendMessage({ method: "ui.processCancelled" });
|
|
|
}
|
|
|
- processing = false;
|
|
|
+ singlefile.extension.core.processing = false;
|
|
|
}
|
|
|
}
|
|
|
|