mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 06:20:02 -04:00
dont use _self on every single a and base tag
This commit is contained in:
parent
805bf23768
commit
be0df961f4
2 changed files with 0 additions and 9 deletions
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue