scuffed ahh assignmentrewriter

This commit is contained in:
velzie 2024-07-19 19:55:15 -04:00
parent 3d30e20150
commit 02fbb25778
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F
10 changed files with 240 additions and 12 deletions

10
src/client/cookie.ts Normal file
View file

@ -0,0 +1,10 @@
Object.defineProperty(document, "cookie", {
get() {
return "";
},
set(value) {
console.log("COOKIE SET", value);
},
});
delete window.cookieStore;

View file

@ -3,6 +3,7 @@ import { decodeUrl } from "./shared";
declare global {
interface Window {
$s: any;
$tryset: any;
$sImport: any;
}
}

View file

@ -20,3 +20,12 @@ function scope(identifier: any) {
// shorthand because this can get out of hand reall quickly
window.$s = scope;
window.$tryset = function (lhs: any, op: string, rhs: any) {
if (lhs instanceof Location) {
// @ts-ignore
locationProxy.href = rhs;
return true;
}
};

View file

@ -54,6 +54,10 @@ function traverseParsedHtml(node, origin?: URL) {
}
}
if (node.name === "meta" && hasAttrib(node, "http-equiv")) {
node.attribs["http-equiv"] = "a";
}
if (hasAttrib(node, "srcdoc"))
node.attribs.srcdoc = rewriteHtml(node.attribs.srcdoc, origin);
if (hasAttrib(node, "style"))