Revert "fix: dont double rewrite urls"

This reverts commit 6705d0ba2b.
This commit is contained in:
velzie 2024-10-17 21:44:09 -04:00
parent fb614d403b
commit eac0323f6b
No known key found for this signature in database
GPG key ID: AA51AEFB0A1F3820

View file

@ -30,11 +30,8 @@ export function rewriteUrl(url: string | URL, meta: URLMeta) {
if (url instanceof URL) {
url = url.href;
}
if (url.startsWith(location.origin)) {
// this is jank and should be temporary!!!!
// debugger;
return url;
} else if (url.startsWith("javascript:")) {
if (url.startsWith("javascript:")) {
return "javascript:" + rewriteJs(url.slice("javascript:".length), meta);
} else if (url.startsWith("blob:")) {
return location.origin + $scramjet.config.prefix + url;