Commit 787ef7b0 authored by Fred Chasen's avatar Fred Chasen

Import Pagedjs

parent 56441266
......@@ -7,9 +7,9 @@
<title>Marginalia - Pagedjs Epub Viewer</title>
<meta content="width=device-width, initial-scale=1" name="viewport">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.1/jszip.min.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.1/jszip.min.js"></script> -->
<!-- <script src="https://unpkg.com/epubjs@0.4.2/dist/epub.min.js"></script> -->
<script src="node_modules/pagedjs/dist/paged.js"></script>
<!-- <script src="node_modules/pagedjs/dist/paged.js"></script> -->
<script src="dist/main.js"></script>
<link rel="stylesheet" type="text/css" href="styles/main.css">
......
......@@ -39,7 +39,6 @@ class Manifest {
}
toc(toc=[]) {
console.log(toc);
let nav = document.getElementById("toc");
let docfrag = document.createDocumentFragment();
toc.forEach((chapter) => {
......
import Uploader from './uploader';
import Manifest from './manifest';
import { Chunker, Polisher, initializeHandlers } from 'pagedjs';
class Reader {
constructor(manifest) {
......@@ -77,10 +78,10 @@ class Reader {
async render(text) {
this.clear();
this.chunker = new Paged.Chunker()
this.polisher = new Paged.Polisher();
this.chunker = new Chunker()
this.polisher = new Polisher();
Paged.initializeHandlers(this.chunker, this.polisher);
initializeHandlers(this.chunker, this.polisher);
let viewer = document.querySelector("#viewer");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment