diff options
author | Andrew Dolgov <[email protected]> | 2018-02-01 15:01:30 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-02-01 15:01:30 +0300 |
commit | 9fec33465bfec462ae9687e3270bc9dcabd83b08 (patch) | |
tree | aff8ca411e15470b0871f5cd8933875ede2a6b0b | |
parent | 9d132623b6fc90021c16c494dfbede6b1cde21e8 (diff) |
cleanup inlined epub styles on render
-rw-r--r-- | read.html | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -647,6 +647,21 @@ }; }); + book.on("renderer:chapterDisplayed", function() { + + // cleanup possibly interfering styles + var c = $("#reader iframe").contents(); + + c.find("p") + .removeAttr("style") + .removeAttr("class") + .css("margin", "0px"); + + c.find("*") + .removeAttr("class"); + + }); + book.on("renderer:keydown", hotkey_handler); book.getMetadata().then(function(meta){ |