mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-19 18:34:57 +01:00
...
This commit is contained in:
parent
94c324b317
commit
f2f1c5d8d4
1 changed files with 4 additions and 3 deletions
|
|
@ -27,7 +27,7 @@
|
|||
from calibre.gui2.viewer.inspector import WebInspector
|
||||
from calibre.gui2.viewer.gestures import GestureHandler
|
||||
from calibre.ebooks.oeb.display.webview import load_html
|
||||
from calibre.constants import isxp, iswindows
|
||||
from calibre.constants import isxp, iswindows, DEBUG
|
||||
# }}}
|
||||
|
||||
def apply_settings(settings, opts):
|
||||
|
|
@ -364,10 +364,11 @@ def javascript(self, string, typ=None):
|
|||
return ans
|
||||
|
||||
def javaScriptConsoleMessage(self, msg, lineno, msgid):
|
||||
prints(msg)
|
||||
if DEBUG:
|
||||
prints(msg)
|
||||
|
||||
def javaScriptAlert(self, frame, msg):
|
||||
if self.debug_javascript:
|
||||
if DEBUG:
|
||||
prints(msg)
|
||||
else:
|
||||
return QWebPage.javaScriptAlert(self, frame, msg)
|
||||
|
|
|
|||
Loading…
Reference in a new issue