List all known properties and ignore wantedProperties

merge-requests/1/head
Olivier Tremblay 4 years ago
parent 855a8aad33
commit f431686a59

@ -335,11 +335,14 @@ function onLoadDOM(dom) {
return;
}
if (outputJSON){
var result = {};
for (propkey in wantedProperties) {
let prop = wantedProperties[propkey];
let result = {};
const allprops = ["title", "excerpt", "byline", "length", "dir", "textContent"];
for (propkey in allprops) {
let prop = allprops[propkey];
result[prop] = article[prop];
}
result["htmlContent"] = article.content;
result["htmlTitle"] = `<h1>${escapeHTML(article.title, document)}</h1>`
writeStream.write(JSON.stringify(result));
return;
}

Loading…
Cancel
Save