mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #4606 (Viewer crash on MOBI files created from PDB)
This commit is contained in:
parent
ae2b434b35
commit
1e12cfeb74
@ -32,7 +32,7 @@ class GlobeAndMail(BasicNewsRecipe):
|
||||
'gallery-controls', 'video', 'galleryLoading','deck','header',
|
||||
'toolsBottom'] },
|
||||
{'class':['credit','inline-img-caption','tab-pointer'] },
|
||||
dict(name='div', attrs={'id':'lead-photo'}),
|
||||
dict(name='div', attrs={'id':['lead-photo', 'most-popular-story']}),
|
||||
dict(name='div', attrs={'class':'right'}),
|
||||
dict(name='div', attrs={'id':'footer'}),
|
||||
dict(name='div', attrs={'id':'beta-msg'}),
|
||||
|
@ -350,7 +350,13 @@ class Document(QWebPage):
|
||||
return self.mainFrame().contentsSize().width() # offsetWidth gives inaccurate results
|
||||
|
||||
def set_bottom_padding(self, amount):
|
||||
self.javascript('$("body").css("padding-bottom", "%dpx")' % amount)
|
||||
padding = '%dpx'%amount
|
||||
try:
|
||||
old_padding = unicode(self.javascript('$("body").css("padding-bottom")').toString())
|
||||
except:
|
||||
old_padding = ''
|
||||
if old_padding != padding:
|
||||
self.javascript('$("body").css("padding-bottom", "%s")' % padding)
|
||||
|
||||
|
||||
class EntityDeclarationProcessor(object):
|
||||
|
Loading…
x
Reference in New Issue
Block a user