dont use _self on every single a and base tag

This commit is contained in:
Percs 2025-03-12 20:16:30 -05:00
parent 805bf23768
commit be0df961f4
2 changed files with 0 additions and 9 deletions

View file

@ -7,9 +7,6 @@ export default function (client: ScramjetClient) {
apply(ctx) { apply(ctx) {
if (ctx.args[0]) ctx.args[0] = rewriteUrl(ctx.args[0], client.meta); 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(); const realwin = ctx.call();
if (!realwin) return ctx.return(realwin); if (!realwin) return ctx.return(realwin);

View file

@ -186,12 +186,6 @@ export const htmlRules: {
fn: (value: string, meta: URLMeta) => rewriteCss(value, meta), fn: (value: string, meta: URLMeta) => rewriteCss(value, meta),
style: "*", style: "*",
}, },
{
fn: (value: string) => {
if (["_parent", "_top", "_unfencedTop"].includes(value)) return "_self";
},
target: ["a", "base"],
},
]; ];
// i need to add the attributes in during rewriting // i need to add the attributes in during rewriting