From be0df961f47e209757f0fbe51aeae19039f4cbfd Mon Sep 17 00:00:00 2001 From: Percs <83934299+Percslol@users.noreply.github.com> Date: Wed, 12 Mar 2025 20:16:30 -0500 Subject: [PATCH] dont use _self on every single a and base tag --- src/client/dom/open.ts | 3 --- src/shared/rewriters/html.ts | 6 ------ 2 files changed, 9 deletions(-) diff --git a/src/client/dom/open.ts b/src/client/dom/open.ts index 2644268..85bc2fc 100644 --- a/src/client/dom/open.ts +++ b/src/client/dom/open.ts @@ -7,9 +7,6 @@ export default function (client: ScramjetClient) { apply(ctx) { if (ctx.args[0]) ctx.args[0] = rewriteUrl(ctx.args[0], client.meta); - if (["_parent", "_top", "_unfencedTop"].includes(ctx.args[1])) - ctx.args[1] = "_self"; - const realwin = ctx.call(); if (!realwin) return ctx.return(realwin); diff --git a/src/shared/rewriters/html.ts b/src/shared/rewriters/html.ts index 3c49ea7..6f29700 100644 --- a/src/shared/rewriters/html.ts +++ b/src/shared/rewriters/html.ts @@ -186,12 +186,6 @@ export const htmlRules: { fn: (value: string, meta: URLMeta) => rewriteCss(value, meta), style: "*", }, - { - fn: (value: string) => { - if (["_parent", "_top", "_unfencedTop"].includes(value)) return "_self"; - }, - target: ["a", "base"], - }, ]; // i need to add the attributes in during rewriting