|
|
@@ -465,7 +465,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
(infobarContent ? " \n info: " + infobarContent : "") + "\n");
|
|
|
this.doc.documentElement.insertBefore(commentNode, this.doc.documentElement.firstChild);
|
|
|
}
|
|
|
- if (this.options.insertCanonicalLink) {
|
|
|
+ if (this.options.insertCanonicalLink && this.options.saveUrl.match(HTTP_URI_PREFIX)) {
|
|
|
let canonicalLink = this.doc.querySelector("link[rel=canonical]");
|
|
|
if (!canonicalLink) {
|
|
|
canonicalLink = this.doc.createElement("link");
|