Add poster attribute rewriting

This commit is contained in:
wearrrrr 2024-07-29 23:54:23 -05:00
parent f9e7fc76d9
commit e789a14592
2 changed files with 5 additions and 2 deletions

View file

@ -37,7 +37,7 @@ function traverseParsedHtml(node, origin?: URL) {
}
/* url attributes */
for (const urlAttr of ["src", "href", "action", "formaction"]) {
for (const urlAttr of ["src", "href", "action", "formaction", "poster"]) {
if (
hasAttrib(node, urlAttr) &&
!isScramjetFile(node.attribs[urlAttr]) &&
@ -52,6 +52,7 @@ function traverseParsedHtml(node, origin?: URL) {
"form",
"media",
"source",
"video",
].includes(node.name)
) {
const value = node.attribs[urlAttr];