install jsdom nodejs package for reader mode too

This commit is contained in:
Martin Rotter 2022-03-16 11:43:04 +01:00
parent 2222043b1b
commit 0b71248396

View file

@ -70,8 +70,8 @@ void Readability::makeHtmlReadable(const QString& html, const QString& base_url)
try { try {
NodeJs::PackageStatus stReadability = qApp->nodejs()->packageStatus({ QSL(READABILITY_PACKAGE), NodeJs::PackageStatus stReadability = qApp->nodejs()->packageStatus({ QSL(READABILITY_PACKAGE),
QSL(READABILITY_VERSION) }); QSL(READABILITY_VERSION) });
NodeJs::PackageStatus stJsdom = qApp->nodejs()->packageStatus({ QSL(READABILITY_PACKAGE), NodeJs::PackageStatus stJsdom = qApp->nodejs()->packageStatus({ QSL(JSDOM_PACKAGE),
QSL(READABILITY_VERSION) }); QSL(JSDOM_VERSION) });
if (stReadability != NodeJs::PackageStatus::UpToDate || if (stReadability != NodeJs::PackageStatus::UpToDate ||
stJsdom != NodeJs::PackageStatus::UpToDate) { stJsdom != NodeJs::PackageStatus::UpToDate) {
@ -85,7 +85,8 @@ void Readability::makeHtmlReadable(const QString& html, const QString& base_url)
"You will be notified when installation is complete.").arg(QSL(APP_NAME)), "You will be notified when installation is complete.").arg(QSL(APP_NAME)),
QSystemTrayIcon::MessageIcon::Warning }, QSystemTrayIcon::MessageIcon::Warning },
{ true, true, false }); { true, true, false });
qApp->nodejs()->installPackages({ { QSL(READABILITY_PACKAGE), QSL(READABILITY_VERSION) } }); qApp->nodejs()->installPackages({ { QSL(READABILITY_PACKAGE), QSL(READABILITY_VERSION) },
{ QSL(JSDOM_PACKAGE), QSL(JSDOM_VERSION) } });
} }
return; return;