openmedialibrary_reader/epub.js/js/hooks/extensions/highlight.js

15 lines
391 B
JavaScript
Raw Normal View History

2015-03-07 19:41:19 +00:00
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();
}