fix: 84 -> 92 on acid3

This commit is contained in:
Percs 2024-11-21 23:19:06 -06:00
parent e9f4e59566
commit 4263feca61
6 changed files with 40 additions and 17 deletions

View file

@ -46,15 +46,13 @@ export function rewriteUrl(url: string | URL, meta: URLMeta) {
if (base.startsWith("about:")) base = unrewriteUrl(self.location.href); // jank!!!!! weird jank!!!
const realUrl = tryCanParseURL(url, base);
if (realUrl) {
return (
location.origin +
$scramjet.config.prefix +
$scramjet.codec.encode(realUrl.href)
);
} else {
return url;
}
if (!realUrl) return url;
return (
location.origin +
$scramjet.config.prefix +
$scramjet.codec.encode(realUrl.href)
);
}
}