|
@@ -318,7 +318,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
DOM.postProcessDoc(this.doc, this.options);
|
|
DOM.postProcessDoc(this.doc, this.options);
|
|
|
const url = new URL(this.baseURI);
|
|
const url = new URL(this.baseURI);
|
|
|
if (this.options.insertSingleFileComment) {
|
|
if (this.options.insertSingleFileComment) {
|
|
|
- let infobarContent = (this.options.infobarContent || "").replace(/\\n/g, "\n").replace(/\\t/g, "\t");
|
|
|
|
|
|
|
+ const infobarContent = (this.options.infobarContent || "").replace(/\\n/g, "\n").replace(/\\t/g, "\t");
|
|
|
const commentNode = this.doc.createComment("\n Page saved with SingleFile" +
|
|
const commentNode = this.doc.createComment("\n Page saved with SingleFile" +
|
|
|
" \n url: " + this.options.url +
|
|
" \n url: " + this.options.url +
|
|
|
" \n saved date: " + new Date() +
|
|
" \n saved date: " + new Date() +
|
|
@@ -1190,7 +1190,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
const { content } = await batchRequest.addURL(resourceURL, false);
|
|
const { content } = await batchRequest.addURL(resourceURL, false);
|
|
|
const DOMParser = DOM.getParser();
|
|
const DOMParser = DOM.getParser();
|
|
|
if (DOMParser) {
|
|
if (DOMParser) {
|
|
|
- let svgDoc = new DOMParser().parseFromString(content, "image/svg+xml");
|
|
|
|
|
|
|
+ const svgDoc = new DOMParser().parseFromString(content, "image/svg+xml");
|
|
|
const hashMatch = originalResourceURL.match(REGEXP_URL_HASH);
|
|
const hashMatch = originalResourceURL.match(REGEXP_URL_HASH);
|
|
|
if (hashMatch && hashMatch[0]) {
|
|
if (hashMatch && hashMatch[0]) {
|
|
|
const symbolElement = svgDoc.querySelector(hashMatch[0]);
|
|
const symbolElement = svgDoc.querySelector(hashMatch[0]);
|