mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 15:00: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
|
@ -185,7 +185,9 @@ export default function (client: ScramjetClient, self: typeof window) {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ function traverseParsedHtml(node, origin?: URL) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* url attributes */
|
/* url attributes */
|
||||||
for (const urlAttr of ["src", "href", "action", "formaction"]) {
|
for (const urlAttr of ["src", "href", "action", "formaction", "poster"]) {
|
||||||
if (
|
if (
|
||||||
hasAttrib(node, urlAttr) &&
|
hasAttrib(node, urlAttr) &&
|
||||||
!isScramjetFile(node.attribs[urlAttr]) &&
|
!isScramjetFile(node.attribs[urlAttr]) &&
|
||||||
|
@ -52,6 +52,7 @@ function traverseParsedHtml(node, origin?: URL) {
|
||||||
"form",
|
"form",
|
||||||
"media",
|
"media",
|
||||||
"source",
|
"source",
|
||||||
|
"video",
|
||||||
].includes(node.name)
|
].includes(node.name)
|
||||||
) {
|
) {
|
||||||
const value = node.attribs[urlAttr];
|
const value = node.attribs[urlAttr];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue