|
@@ -1376,6 +1376,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
const authorElement = this.doc.querySelector("meta[name=author]");
|
|
const authorElement = this.doc.querySelector("meta[name=author]");
|
|
|
const creatorElement = this.doc.querySelector("meta[name=creator]");
|
|
const creatorElement = this.doc.querySelector("meta[name=creator]");
|
|
|
const publisherElement = this.doc.querySelector("meta[name=publisher]");
|
|
const publisherElement = this.doc.querySelector("meta[name=publisher]");
|
|
|
|
|
+ const headingElement = this.doc.querySelector("h1");
|
|
|
this.options.title = titleElement ? titleElement.textContent.trim() : "";
|
|
this.options.title = titleElement ? titleElement.textContent.trim() : "";
|
|
|
this.options.infobarContent = await ProcessorHelper.evalTemplate(this.options.infobarTemplate, this.options, null, true);
|
|
this.options.infobarContent = await ProcessorHelper.evalTemplate(this.options.infobarTemplate, this.options, null, true);
|
|
|
this.options.info = {
|
|
this.options.info = {
|
|
@@ -1383,7 +1384,8 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
lang: this.doc.documentElement.lang,
|
|
lang: this.doc.documentElement.lang,
|
|
|
author: authorElement && authorElement.content ? authorElement.content.trim() : "",
|
|
author: authorElement && authorElement.content ? authorElement.content.trim() : "",
|
|
|
creator: creatorElement && creatorElement.content ? creatorElement.content.trim() : "",
|
|
creator: creatorElement && creatorElement.content ? creatorElement.content.trim() : "",
|
|
|
- publisher: publisherElement && publisherElement.content ? publisherElement.content.trim() : ""
|
|
|
|
|
|
|
+ publisher: publisherElement && publisherElement.content ? publisherElement.content.trim() : "",
|
|
|
|
|
+ heading: headingElement && headingElement.textContent ? headingElement.textContent.trim() : ""
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1403,6 +1405,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
const date = options.saveDate;
|
|
const date = options.saveDate;
|
|
|
const url = util.parseURL(options.saveUrl);
|
|
const url = util.parseURL(options.saveUrl);
|
|
|
template = await Util.evalTemplateVariable(template, "page-title", () => options.title || "No title", dontReplaceSlash, options.filenameReplacementCharacter);
|
|
template = await Util.evalTemplateVariable(template, "page-title", () => options.title || "No title", dontReplaceSlash, options.filenameReplacementCharacter);
|
|
|
|
|
+ template = await Util.evalTemplateVariable(template, "page-heading", () => options.info.heading || "No heading", dontReplaceSlash, options.filenameReplacementCharacter);
|
|
|
template = await Util.evalTemplateVariable(template, "page-language", () => options.info.lang || "No language", dontReplaceSlash, options.filenameReplacementCharacter);
|
|
template = await Util.evalTemplateVariable(template, "page-language", () => options.info.lang || "No language", dontReplaceSlash, options.filenameReplacementCharacter);
|
|
|
template = await Util.evalTemplateVariable(template, "page-description", () => options.info.description || "No description", dontReplaceSlash, options.filenameReplacementCharacter);
|
|
template = await Util.evalTemplateVariable(template, "page-description", () => options.info.description || "No description", dontReplaceSlash, options.filenameReplacementCharacter);
|
|
|
template = await Util.evalTemplateVariable(template, "page-author", () => options.info.author || "No author", dontReplaceSlash, options.filenameReplacementCharacter);
|
|
template = await Util.evalTemplateVariable(template, "page-author", () => options.info.author || "No author", dontReplaceSlash, options.filenameReplacementCharacter);
|