master
Max Lehmann 4 years ago
parent d8f31cfcf3
commit 598952611d

BIN
.DS_Store vendored

Binary file not shown.

@ -107,8 +107,6 @@ https://pad.xpub.nl/p/HTML_Finale
</div>
<br>
<!--alphabet img-->
<img src="img/alphabet_black.png" alt="alphabet">
<div class="bulletpoints" >
<ul>
<li>The origin of "archive" is complex, and its meaning has constantly been evolving since it first arose.</li>
@ -150,6 +148,8 @@ https://pad.xpub.nl/p/HTML_Finale
</ul>
</div>
<br>
<!--alphabet img-->
<img src="img/alphabet_black.png" alt="alphabet">
<div class="glossary" >
Arkeion:
@ -2978,8 +2978,9 @@ popup_button.addEventListener("click", function (e) {
}
async function buildTOC() {
class handlers extends window.Paged.Handler {
try {
console.log("toc");
class handlers extends window.Paged.Handler {
constructor(chunker, polisher, caller) {
super(chunker, polisher, caller);
}
@ -2994,17 +2995,35 @@ popup_button.addEventListener("click", function (e) {
}
window.Paged.registerHandlers(handlers);
}
catch(err) {
}
}
/* If you want to put a loading content, it's here. It will show the print prompt when it's done loading */
async function preview() {
await window.PagedPolyfill.preview();
window.print();
try {
console.log("preview");
await window.PagedPolyfill.preview();
window.print();
}
catch(err) {
}
}
async function load_pagedjs() {
await $.getScript("https://unpkg.com/pagedjs/dist/paged.polyfill.js", function(data, textStatus, jqxhr) {});
preview();
buildTOC();
}
var printbutton = document.getElementById("printbutton");
printbutton.onclick = function(){
console.log("bla");
var boxes = document.getElementsByName("print");
for (var i=0; i<boxes.length; i++) {
if (boxes[i].checked) {
@ -3022,9 +3041,10 @@ popup_button.addEventListener("click", function (e) {
}
document.getElementsByTagName("body")[0].classList.add("pagedjs");
$.getScript("https://unpkg.com/pagedjs/dist/paged.polyfill.js", function(data, textStatus, jqxhr) {});
buildTOC();
preview();
load_pagedjs();
};

Loading…
Cancel
Save