scramming my jet rn

Co-authored-by: Percs <Percslol@users.noreply.github.com>
Co-authored-by: rifting <rifting@users.noreply.github.com>
This commit is contained in:
Avad3 2024-07-13 17:56:14 -04:00
parent 1ea21280f8
commit 35782bec7e
6 changed files with 67 additions and 5 deletions

View file

@ -1 +1,18 @@
// the DAMN WINDOW PROXY
const windowProxy = new Proxy(window, {
get(target, prop) {
const propIsString = typeof prop === "string";
if (propIsString && prop === "location") {
return target.__location;
} else if (propIsString && ["window", "top", "parent", "self", "globalThis"].includes(prop)) {
return target.__window;
}
return target[prop];
},
set(target, p, newValue, receiver) {
return Reflect.set(target, p, newValue, receiver);
},
});
window.__window = windowProxy;