diff --git a/qutebrowser/browser/webengine/webview.py b/qutebrowser/browser/webengine/webview.py index 1a115c9de..bb160d1a2 100644 --- a/qutebrowser/browser/webengine/webview.py +++ b/qutebrowser/browser/webengine/webview.py @@ -276,8 +276,7 @@ class WebEnginePage(QWebEnginePage): def javaScriptConsoleMessage(self, level, msg, line, source): """Log javascript messages to qutebrowser's log.""" # FIXME:qtwebengine maybe unify this in the tab api somehow? - setting = config.val.log_javascript_console - if setting == 'none': + if config.val.content.javascript.log == 'none': return level_to_logger = { diff --git a/qutebrowser/browser/webkit/webpage.py b/qutebrowser/browser/webkit/webpage.py index 10ff1ba8a..b7a8fe2a5 100644 --- a/qutebrowser/browser/webkit/webpage.py +++ b/qutebrowser/browser/webkit/webpage.py @@ -446,15 +446,14 @@ 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) + logger = logmap[config.val.content.javascript.log] + logger(logstring) def acceptNavigationRequest(self, _frame: QWebFrame,