mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 22:40:01 -04:00
merge
This commit is contained in:
commit
b6bdb674fb
20 changed files with 61 additions and 197 deletions
|
@ -15,12 +15,14 @@ function tryCanParseURL(url: string, origin?: string | URL): URL | null {
|
|||
}
|
||||
|
||||
export function rewriteBlob(url: string, meta: URLMeta) {
|
||||
let blob = new URL(url.substring("blob:".length));
|
||||
const blob = new URL(url.substring("blob:".length));
|
||||
|
||||
return "blob:" + meta.origin.origin + blob.pathname;
|
||||
}
|
||||
|
||||
export function unrewriteBlob(url: string) {
|
||||
let blob = new URL(url.substring("blob:".length));
|
||||
const blob = new URL(url.substring("blob:".length));
|
||||
|
||||
return "blob:" + location.origin + blob.pathname;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue