From 7767c37aeacef72929f8b13e2bd8b974d15424a9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 1 Feb 2018 15:18:30 +0300 Subject: Revert "Revert "cleanup inlined epub styles on render"" This reverts commit 9de9c18e8f09e8a901d78a55f6c453b2c6e1fd23. --- read.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'read.html') diff --git a/read.html b/read.html index 03ff9e3..c552960 100644 --- a/read.html +++ b/read.html @@ -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){ -- cgit v1.2.3