revert log-javascript-console changes
This commit is contained in:
parent
6431542eba
commit
2867df4c21
@ -503,16 +503,8 @@ class BrowserPage(QWebPage):
|
||||
|
||||
def javaScriptConsoleMessage(self, msg, line, source):
|
||||
"""Override javaScriptConsoleMessage to use debug log."""
|
||||
|
||||
log_javascript_console = config.get('general',
|
||||
'log-javascript-console' )
|
||||
logstring = "[{}:{}] {}".format(source, line, msg)
|
||||
logmap = {
|
||||
'debug': log.js.debug,
|
||||
'info': log.js.info,
|
||||
'none': lambda arg: None
|
||||
}
|
||||
logmap[log_javascript_console](logstring)
|
||||
if config.get('general', 'log-javascript-console'):
|
||||
log.js.debug("[{}:{}] {}".format(source, line, msg))
|
||||
|
||||
def chooseFile(self, _frame, suggested_file):
|
||||
"""Override QWebPage's chooseFile to be able to chose a file to upload.
|
||||
|
@ -229,13 +229,8 @@ def data(readonly=False):
|
||||
"launched."),
|
||||
|
||||
('log-javascript-console',
|
||||
SettingValue(typ.String(
|
||||
valid_values=typ.ValidValues(
|
||||
('none', 'Not displayed'),
|
||||
('debug', 'Display in debug mode'),
|
||||
('info', 'Display always')
|
||||
)), 'debug'),
|
||||
"How to log javascript console messages."),
|
||||
SettingValue(typ.Bool(), 'false'),
|
||||
"Whether to log javascript console messages."),
|
||||
|
||||
('save-session',
|
||||
SettingValue(typ.Bool(), 'false'),
|
||||
|
Loading…
Reference in New Issue
Block a user