mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 23:30:00 -04:00
scuffed ahh assignmentrewriter
This commit is contained in:
parent
3d30e20150
commit
02fbb25778
10 changed files with 240 additions and 12 deletions
10
src/client/cookie.ts
Normal file
10
src/client/cookie.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
Object.defineProperty(document, "cookie", {
|
||||
get() {
|
||||
return "";
|
||||
},
|
||||
set(value) {
|
||||
console.log("COOKIE SET", value);
|
||||
},
|
||||
});
|
||||
|
||||
delete window.cookieStore;
|
|
@ -3,6 +3,7 @@ import { decodeUrl } from "./shared";
|
|||
declare global {
|
||||
interface Window {
|
||||
$s: any;
|
||||
$tryset: any;
|
||||
$sImport: any;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue