1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-05 15:32:55 +02:00
epub.js/hooks/extensions/hypothesis.js
2015-09-16 23:35:44 -07:00

11 lines
310 B
JavaScript

EPUBJS.Hooks.register("beforeChapterDisplay").hypothesis = function(callback, renderer) {
renderer.render.window.hypothesisConfig = function () {
return {
constructor: this.Annotator.Guest
};
};
EPUBJS.core.addScript("//hypothes.is/embed.js", null, renderer.doc.head);
if(callback) callback();
};