mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00

Still need to work on stylings. Currently the sidebar is not visible due to a low z-index, but I would like to do a better looking integration when I find time. ~
14 lines
No EOL
498 B
JavaScript
14 lines
No EOL
498 B
JavaScript
EPUBJS.Hooks.register("beforeChapterDisplay").hypothesis = function(callback, renderer){
|
|
var folder = EPUBJS.core.folder(location.pathname);
|
|
var cssPath = (folder + EPUBJS.cssPath) || folder;
|
|
|
|
if(!renderer) return;
|
|
|
|
EPUBJS.core.addScript("/hooks/extensions/embedh.js", null, renderer.doc.head);
|
|
|
|
EPUBJS.core.addScript("https://hypothes.is/embed.js", null, renderer.doc.head);
|
|
|
|
EPUBJS.core.addCss( cssPath + "annotations.css", null, renderer.doc.head);
|
|
|
|
if(callback) callback();
|
|
}; |