|
@@ -332,7 +332,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
|
|
|
|
|
initialize() {
|
|
initialize() {
|
|
|
this.maxResources = this.batchRequest.getMaxResources();
|
|
this.maxResources = this.batchRequest.getMaxResources();
|
|
|
- if (!this.options.removeFrames) {
|
|
|
|
|
|
|
+ if (!this.options.saveRawPage && !this.options.removeFrames) {
|
|
|
this.options.framesData.forEach(frameData => this.maxResources += frameData.maxResources || 0);
|
|
this.options.framesData.forEach(frameData => this.maxResources += frameData.maxResources || 0);
|
|
|
}
|
|
}
|
|
|
this.stats.set("processed", "resources", this.maxResources);
|
|
this.stats.set("processed", "resources", this.maxResources);
|
|
@@ -524,7 +524,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
imgElement.setAttribute("src", imgData.currentSrc);
|
|
imgElement.setAttribute("src", imgData.currentSrc);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- if (this.options.lazyLoadImages) {
|
|
|
|
|
|
|
+ if (!this.options.saveRawPage && this.options.lazyLoadImages) {
|
|
|
this.doc.querySelectorAll("img[data-src]").forEach(imgElement => {
|
|
this.doc.querySelectorAll("img[data-src]").forEach(imgElement => {
|
|
|
const imgData = this.options.imageData[Number(imgElement.getAttribute(dataAttributeName))];
|
|
const imgData = this.options.imageData[Number(imgElement.getAttribute(dataAttributeName))];
|
|
|
if ((!imgElement.getAttribute("src") || imgElement.getAttribute("src") == EMPTY_IMAGE) && imgElement.getAttribute("data-src")) {
|
|
if ((!imgElement.getAttribute("src") || imgElement.getAttribute("src") == EMPTY_IMAGE) && imgElement.getAttribute("data-src")) {
|
|
@@ -889,7 +889,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async resolveFrameURLs() {
|
|
async resolveFrameURLs() {
|
|
|
- if (this.options.framesData) {
|
|
|
|
|
|
|
+ if (!this.options.saveRawPage && this.options.framesData) {
|
|
|
const frameElements = Array.from(this.doc.querySelectorAll("iframe, frame, object[type=\"text/html\"][data]"));
|
|
const frameElements = Array.from(this.doc.querySelectorAll("iframe, frame, object[type=\"text/html\"][data]"));
|
|
|
await Promise.all(frameElements.map(async frameElement => {
|
|
await Promise.all(frameElements.map(async frameElement => {
|
|
|
ProcessorHelper.setFrameEmptySrc(frameElement);
|
|
ProcessorHelper.setFrameEmptySrc(frameElement);
|