diff --git a/index.js b/index.js index 8aab6d9..7399027 100644 --- a/index.js +++ b/index.js @@ -36,7 +36,17 @@ try{ if (!title) title = await (await page.waitForSelector('h1')).evaluate(el => el.textContent); if (!subtitle) subtitle = await (await page.waitForSelector('h2')).evaluate(el => el.textContent); - console.log(title,subtitle) + console.log(title,subtitle); + + await page.emulateMediaType('screen'); + await page.addStyleTag({content: ` + .hidden-print { + display: none !important; + } + *:not(code, .code > *){ + color: #000 !important; + } + `}); const pages = await page.pdf({ //path: `${path}/${date}_${title}_pages.pdf`,