|
|
@@ -122,7 +122,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
sequential: [
|
|
|
{ option: "compressHTML", action: "compressHTML" },
|
|
|
{ option: "insertSingleFileComment", action: "insertSingleFileComment" },
|
|
|
- { action: "removeDefaultHeadTags" }
|
|
|
+ { action: "cleanup" }
|
|
|
]
|
|
|
}];
|
|
|
|
|
|
@@ -416,7 +416,8 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- removeDefaultHeadTags() {
|
|
|
+ cleanup() {
|
|
|
+ this.doc.querySelectorAll("style[data-single-file-sheet]").forEach(element => element.removeAttribute("data-single-file-sheet"));
|
|
|
this.doc.querySelectorAll("base").forEach(element => element.remove());
|
|
|
if (this.doc.head.querySelectorAll("*").length == 1 && this.doc.head.querySelector("meta[charset]") && this.doc.body.childNodes.length == 0) {
|
|
|
this.doc.head.querySelector("meta[charset]").remove();
|