From 219412139180a4ee3d27c4f7c7aeceab305c9b43 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 9 Mar 2016 00:16:37 +0530 Subject: [PATCH] E-book viewer: Hide list numbers for popup footnotes when the footnotes are use
    as the number are likely to be incorrect. --- resources/compiled_coffeescript.zip | Bin 104602 -> 104849 bytes src/calibre/ebooks/oeb/display/extract.coffee | 5 +++++ 2 files changed, 5 insertions(+) diff --git a/resources/compiled_coffeescript.zip b/resources/compiled_coffeescript.zip index dc13c55307dd1fc3b63cebf941051ca66f50af9a..3a2c4183af25c80aa1eeb998340f5477c4fc922b 100644 GIT binary patch delta 609 zcmZ8dO=uHA7|pkp7`E6StWr&)+Yp+h)!6JNO=?(C#2-)!qV-b6ZZ{hUY}%MzkCZ`&3O5AOI%>OO{fZeooVg0PR45i;D%hc0-Jkm7!~Trk@No<{00 z!M(BRWF5}+We))#OYK{nUOM*lFX+U^U_qt+0*KxIFriIW)nt< zHS4E$4am~BCitAz1N4~~j5c6|`kma)Yaeykg;?=3uIy=@X)R)$NN|d-t;30bhDOlm delta 398 zcmY+8&npB06vy|CVjD%{SBcFSP7=F2GyB7@68RB|a8fioJ9DxZlp?>@$VFk_?z~+& zxQLT52Nz-8{3!eZ!c~sSZ8PKM@cMo~@7w$KcCGxqv;5N@g*zCi?R(6~@@1XN<%|cP ztqLoq99OfmbIQ!zls2u!tj6U{ppyi!jP9e!VF=>;Du;ZQ#e1z1msVKtSv70(;P&(F zymLXdaS-q(UJZVHjf>#7xOG3E8TaB-wg49l4n*8CWDwVHjf-0Y>Whp1ze3*#6O6b) zBS{!yF1GQ-D#y2-Lb^#p1M_qE$2CVR6{c*yI=9(FV~+3k&}s^LnGKQdY|Z;@1Io1n zPoin3ALBG-LX&$x0j?agC{Pxm^sji3pq1DTD5EceE_Aw$w7r@(ful1Mx~Mq~15}cM zPP$IRC~Xt;JI;+Uh4l(8ybzFNJ*>%UPzwb@zGzg{1F{kh2USUuB6=j`4M&xTs!Kv6 NFVI5@sz}X1(=Vd;j|~6- diff --git a/src/calibre/ebooks/oeb/display/extract.coffee b/src/calibre/ebooks/oeb/display/extract.coffee index 7df5c2d458..a314d14257 100644 --- a/src/calibre/ebooks/oeb/display/extract.coffee +++ b/src/calibre/ebooks/oeb/display/extract.coffee @@ -158,6 +158,11 @@ class CalibreExtract is_footnote_container = is_epub_footnote(start_elem) for elem in get_parents_and_self(start_elem) elem.do_not_hide = true + style = window.getComputedStyle(elem) + if style.display == 'list-item' and style.listStyleType not in ['disc', 'circle', 'square'] + # We cannot display list numbers since they will be + # incorrect as we are removing siblings of this element. + elem.style.listStyleType = 'none' for elem in document.body.getElementsByTagName('*') if in_note if known_targets.hasOwnProperty(elem.getAttribute('id'))