mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
...
This commit is contained in:
parent
94c324b317
commit
f2f1c5d8d4
@ -27,7 +27,7 @@ from calibre.gui2.viewer.table_popup import TablePopup
|
||||
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 @@ class Document(QWebPage): # {{{
|
||||
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…
x
Reference in New Issue
Block a user