mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
fix: disallow grabbing scramjet-data
This commit is contained in:
parent
1b50dda5c5
commit
fd7cec815c
1 changed files with 5 additions and 1 deletions
|
@ -166,6 +166,10 @@ export default function (client: ScramjetClient, self: typeof window) {
|
||||||
apply(ctx) {
|
apply(ctx) {
|
||||||
const [name] = ctx.args;
|
const [name] = ctx.args;
|
||||||
|
|
||||||
|
if (name.startsWith("scramjet-data")) {
|
||||||
|
return ctx.return(null);
|
||||||
|
}
|
||||||
|
|
||||||
if (ctx.fn.call(ctx.this, `scramjet-data-${name}`)) {
|
if (ctx.fn.call(ctx.this, `scramjet-data-${name}`)) {
|
||||||
ctx.return(ctx.fn.call(ctx.this, `scramjet-data-${name}`));
|
ctx.return(ctx.fn.call(ctx.this, `scramjet-data-${name}`));
|
||||||
}
|
}
|
||||||
|
@ -237,7 +241,7 @@ export default function (client: ScramjetClient, self: typeof window) {
|
||||||
if (!realwin) return realwin;
|
if (!realwin) return realwin;
|
||||||
|
|
||||||
if (SCRAMJETCLIENT in realwin.self) {
|
if (SCRAMJETCLIENT in realwin.self) {
|
||||||
if (realwin.location.href.includes("accounts.google.com")) return null; // don't question it
|
// if (realwin.location.href.includes("accounts.google.com")) return null; // don't question it
|
||||||
|
|
||||||
return realwin.self[SCRAMJETCLIENT].globalProxy;
|
return realwin.self[SCRAMJETCLIENT].globalProxy;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue