mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 22:40:01 -04:00
fix: 84 -> 92 on acid3
This commit is contained in:
parent
e9f4e59566
commit
4263feca61
6 changed files with 40 additions and 17 deletions
|
@ -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)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue