uweb/searchurl/txt/epub.html

12 lines
419 B
HTML
Raw Normal View History

<script src="https://cdn.jsdelivr.net/npm/epubjs/dist/epub.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jszip/dist/jszip.min.js"></script>
<div id="area"></div>
<script>
let url = location.search.substring(3);
if(url.startsWith("file:///"))
url = "https://local/"+url.substring(8);
var book = ePub(url);
var rendition = book.renderTo("area");
var displayed = rendition.display();
</script>