do the stupid skibidi hack

This commit is contained in:
velzie 2024-10-12 14:25:04 -04:00
parent 797607aabb
commit 91604fc6bb
3 changed files with 30 additions and 7 deletions

View file

@ -70,7 +70,12 @@ export default function (client: ScramjetClient, self: typeof window) {
} else if (
["src", "data", "href", "action", "formaction"].includes(attr)
) {
value = encodeUrl(value, client.meta);
if (element === HTMLMediaElement && value.startsWith("blob:")) {
let origin = new URL(value.substring("blob:".length));
value = "blob:" + location.origin + origin.pathname;
} else {
value = encodeUrl(value, client.meta);
}
} else if (attr === "srcdoc") {
value = rewriteHtml(
value,