mirror of
https://github.com/NohamR/pdfy.git
synced 2026-11-25 23:07:52 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22485ccf71 | ||
|
|
640b5d830c |
No files matched your search
Generated
+4
-4
@@ -8,7 +8,7 @@
|
|||||||
"name": "pdfy",
|
"name": "pdfy",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"commander": "^15.0.0",
|
"commander": "^15.1.0",
|
||||||
"pino": "^10.4.0",
|
"pino": "^10.4.0",
|
||||||
"pino-pretty": "^13.2.0",
|
"pino-pretty": "^13.2.0",
|
||||||
"puppeteer": "^25.16.0"
|
"puppeteer": "^25.16.0"
|
||||||
@@ -135,9 +135,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/commander": {
|
"node_modules/commander": {
|
||||||
"version": "15.0.0",
|
"version": "15.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/commander/-/commander-15.1.0.tgz",
|
||||||
"integrity": "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==",
|
"integrity": "sha512-cgnQ88TRrWcC7pVq46RzJVRMktu3W2RcbnoidnfBsl1bmDCBwJS/udcIZpKoCrbAYYaCqsz1yZCVIgbIaU3ddQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22.12.0"
|
"node": ">=22.12.0"
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"commander": "^15.0.0",
|
"commander": "^15.1.0",
|
||||||
"pino": "^10.4.0",
|
"pino": "^10.4.0",
|
||||||
"pino-pretty": "^13.2.0",
|
"pino-pretty": "^13.2.0",
|
||||||
"puppeteer": "^25.16.0"
|
"puppeteer": "^25.16.0"
|
||||||
|
|||||||
@@ -143,6 +143,15 @@ export async function extractRenderedContent (page) {
|
|||||||
doc.documentElement.setAttribute('data-mode', dataMode)
|
doc.documentElement.setAttribute('data-mode', dataMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The article HTML is later re-rendered from an opaque origin (about:blank),
|
||||||
|
// so resources become cross-origin. Sites rarely send CORS headers for
|
||||||
|
// images, which makes images with `crossorigin="anonymous"` fail to load
|
||||||
|
// (and `integrity` checks reject them). Strip both so images render.
|
||||||
|
for (const el of doc.querySelectorAll('[crossorigin], [integrity]')) {
|
||||||
|
el.removeAttribute('crossorigin')
|
||||||
|
el.removeAttribute('integrity')
|
||||||
|
}
|
||||||
|
|
||||||
const cs = getComputedStyle(doc.documentElement)
|
const cs = getComputedStyle(doc.documentElement)
|
||||||
const cssVars = ['--fg', '--bg', '--bd', '--lk', '--hg']
|
const cssVars = ['--fg', '--bg', '--bd', '--lk', '--hg']
|
||||||
const inlineVars = cssVars
|
const inlineVars = cssVars
|
||||||
|
|||||||
Reference in new issue
Block a user