Skip to content

Commit

Permalink
fix: disallow grabbing scramjet-data
Browse files Browse the repository at this point in the history
  • Loading branch information
Percslol committed Nov 10, 2024
1 parent 1b50dda commit fd7cec8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client/dom/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ export default function (client: ScramjetClient, self: typeof window) {
apply(ctx) {
const [name] = ctx.args;

if (name.startsWith("scramjet-data")) {
return ctx.return(null);
}

if (ctx.fn.call(ctx.this, `scramjet-data-${name}`)) {
ctx.return(ctx.fn.call(ctx.this, `scramjet-data-${name}`));
}
Expand Down Expand Up @@ -237,7 +241,7 @@ export default function (client: ScramjetClient, self: typeof window) {
if (!realwin) return realwin;

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;
} else {
Expand Down

0 comments on commit fd7cec8

Please sign in to comment.