mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
9a88afb370
commit
49b8fadbc2
@ -162,9 +162,8 @@ def replace_calibre_links_to_books(html):
|
|||||||
changed = False
|
changed = False
|
||||||
dom.body.querySelectorAll('a[href]').forEach(def (link):
|
dom.body.querySelectorAll('a[href]').forEach(def (link):
|
||||||
nonlocal changed
|
nonlocal changed
|
||||||
if not link.href:
|
if not link.href or not link.href.startswith('calibre://'):
|
||||||
return
|
return
|
||||||
if link.href.startswith('calibre://'):
|
|
||||||
url = v'new URL(link.href, window.location.origin)'
|
url = v'new URL(link.href, window.location.origin)'
|
||||||
if url.hostname is not 'show-book' and url.hostname is not 'view-book':
|
if url.hostname is not 'show-book' and url.hostname is not 'view-book':
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user