diff --git a/index.js b/index.js
index 2102147..ea679ab 100644
--- a/index.js
+++ b/index.js
@@ -36,7 +36,8 @@ async function discoverExtensionId(browser) {
}
async function extractArticle(page, readabilityPath) {
- await page.addScriptTag({ path: readabilityPath });
+ const readabilitySource = fs.readFileSync(readabilityPath, "utf-8");
+ await page.evaluate(readabilitySource);
const article = await page.evaluate(() => {
const doc = document.cloneNode(true);
const reader = new Readability(doc);
@@ -202,8 +203,12 @@ async function main() {
const contentHtml = await extractRenderedContent(readerPage, `chrome-extension://${extId}/data/reader/`);
await readerPage.close();
+ const highlightCss = '';
+ const highlightJs = '