mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
Add poster attribute rewriting
This commit is contained in:
parent
f9e7fc76d9
commit
e789a14592
2 changed files with 5 additions and 2 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue