mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
chore: prettier
This commit is contained in:
parent
3138baf2c8
commit
4d7fa7abb6
6 changed files with 18 additions and 15 deletions
|
@ -45,7 +45,7 @@ export function decodeUrl(url: string | URL) {
|
|||
|
||||
if (
|
||||
tryCanParseURL(url)?.pathname.startsWith(
|
||||
self.$scramjet.config.prefix + "worker",
|
||||
self.$scramjet.config.prefix + "worker"
|
||||
)
|
||||
) {
|
||||
return new URL(new URL(url).searchParams.get("origin")).href;
|
||||
|
@ -55,7 +55,7 @@ export function decodeUrl(url: string | URL) {
|
|||
return url;
|
||||
} else if (tryCanParseURL(url)) {
|
||||
return self.$scramjet.codec.decode(
|
||||
url.slice((location.origin + self.$scramjet.config.prefix).length),
|
||||
url.slice((location.origin + self.$scramjet.config.prefix).length)
|
||||
);
|
||||
} else {
|
||||
return url;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue