Update epub reader and pdf reader
Update epub reader and use pdf.js tu view pdf files
This commit is contained in:
14
cps/static/js/hooks/extensions/highlight.js
Normal file
14
cps/static/js/hooks/extensions/highlight.js
Normal file
@ -0,0 +1,14 @@
|
||||
EPUBJS.Hooks.register("beforeChapterDisplay").highlight = function(callback, renderer){
|
||||
|
||||
// EPUBJS.core.addScript("js/libs/jquery.highlight.js", null, renderer.doc.head);
|
||||
|
||||
var s = document.createElement("style");
|
||||
s.innerHTML =".highlight { background: yellow; font-weight: normal; }";
|
||||
|
||||
renderer.render.document.head.appendChild(s);
|
||||
|
||||
if(callback) callback();
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user