mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Reader: allow book urls to be relative (#29)
This commit is contained in:
@@ -324,6 +324,6 @@ const params = new URLSearchParams(location.search)
|
||||
const url = params.get('url')
|
||||
if (url) fetch(url)
|
||||
.then(res => res.blob())
|
||||
.then(blob => open(new File([blob], new URL(url).pathname)))
|
||||
.then(blob => open(new File([blob], new URL(url, window.location.origin).pathname)))
|
||||
.catch(e => console.error(e))
|
||||
else dropTarget.style.visibility = 'visible'
|
||||
|
||||
Reference in New Issue
Block a user