|
|
@@ -65,6 +65,7 @@ const SingleFileCore = (() => {
|
|
|
this.processor.resetCharsetMeta();
|
|
|
this.processor.insertFaviconLink();
|
|
|
this.processor.resolveHrefs();
|
|
|
+ this.processor.insertSingleFileCommentNode();
|
|
|
await Promise.all([this.processor.inlineStylesheets(true), this.processor.linkStylesheets()], this.processor.attributeStyles(true));
|
|
|
this.pendingPromises = Promise.all([this.processor.inlineStylesheets(), this.processor.attributeStyles(), this.processor.pageResources()]);
|
|
|
if (this.onprogress) {
|
|
|
@@ -285,6 +286,11 @@ const SingleFileCore = (() => {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ insertSingleFileCommentNode() {
|
|
|
+ const commentNode = this.doc.createComment("\n Archive processed by SingleFile \n url: " + this.baseURI + " \n saved date: " + new Date() + " \n");
|
|
|
+ this.doc.documentElement.insertBefore(commentNode, this.doc.documentElement.firstChild);
|
|
|
+ }
|
|
|
+
|
|
|
async pageResources() {
|
|
|
await Promise.all([
|
|
|
DomProcessorHelper.processAttribute(this.doc.querySelectorAll("link[href][rel*=\"icon\"]"), "href", this.baseURI),
|