Don't log javascript console messages by default.
This commit is contained in:
parent
0f48ea62c1
commit
4704e81b41
@ -19,6 +19,7 @@
|
|||||||
|<<general-site-specific-quirks,site-specific-quirks>>|Enable workarounds for broken sites.
|
|<<general-site-specific-quirks,site-specific-quirks>>|Enable workarounds for broken sites.
|
||||||
|<<general-default-encoding,default-encoding>>|Default encoding to use for websites.
|
|<<general-default-encoding,default-encoding>>|Default encoding to use for websites.
|
||||||
|<<general-new-instance-open-target,new-instance-open-target>>|How to open links in an existing instance if a new one is launched.
|
|<<general-new-instance-open-target,new-instance-open-target>>|How to open links in an existing instance if a new one is launched.
|
||||||
|
|<<general-log-javascript-console,log-javascript-console>>|Whether to log javascript console messages.
|
||||||
|==============
|
|==============
|
||||||
|
|
||||||
.Quick reference for section ``ui''
|
.Quick reference for section ``ui''
|
||||||
@ -371,6 +372,17 @@ Valid values:
|
|||||||
|
|
||||||
Default: +pass:[window]+
|
Default: +pass:[window]+
|
||||||
|
|
||||||
|
[[general-log-javascript-console]]
|
||||||
|
=== log-javascript-console
|
||||||
|
Whether to log javascript console messages.
|
||||||
|
|
||||||
|
Valid values:
|
||||||
|
|
||||||
|
* +true+
|
||||||
|
* +false+
|
||||||
|
|
||||||
|
Default: +pass:[false]+
|
||||||
|
|
||||||
== ui
|
== ui
|
||||||
General options related to the user interface.
|
General options related to the user interface.
|
||||||
|
|
||||||
|
@ -310,7 +310,8 @@ class BrowserPage(QWebPage):
|
|||||||
|
|
||||||
def javaScriptConsoleMessage(self, msg, line, source):
|
def javaScriptConsoleMessage(self, msg, line, source):
|
||||||
"""Override javaScriptConsoleMessage to use debug log."""
|
"""Override javaScriptConsoleMessage to use debug log."""
|
||||||
log.js.debug("[{}:{}] {}".format(source, line, msg))
|
if config.get('general', 'log-javascript-console'):
|
||||||
|
log.js.debug("[{}:{}] {}".format(source, line, msg))
|
||||||
|
|
||||||
def chooseFile(self, _frame, suggested_file):
|
def chooseFile(self, _frame, suggested_file):
|
||||||
"""Override QWebPage's chooseFile to be able to chose a file to upload.
|
"""Override QWebPage's chooseFile to be able to chose a file to upload.
|
||||||
|
@ -189,6 +189,10 @@ DATA = collections.OrderedDict([
|
|||||||
SettingValue(typ.NewInstanceOpenTarget(), 'window'),
|
SettingValue(typ.NewInstanceOpenTarget(), 'window'),
|
||||||
"How to open links in an existing instance if a new one is "
|
"How to open links in an existing instance if a new one is "
|
||||||
"launched."),
|
"launched."),
|
||||||
|
|
||||||
|
('log-javascript-console',
|
||||||
|
SettingValue(typ.Bool(), 'false'),
|
||||||
|
"Whether to log javascript console messages."),
|
||||||
)),
|
)),
|
||||||
|
|
||||||
('ui', sect.KeyValue(
|
('ui', sect.KeyValue(
|
||||||
|
Loading…
Reference in New Issue
Block a user