From 6f934d4a98f93e67a8f3c9e5c6708405e80179fd Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 29 Aug 2022 20:03:37 +0200 Subject: Relax errors shown in the UI - Hide CSP error even if it's prefixed by [Report only] - Always hide errors from Greasemonkey scripts (cherry picked from commit 47ef2ca41d6f1f3981b4667105f9a1ce535beee6) --- doc/help/settings.asciidoc | 5 +++-- qutebrowser/config/configdata.yml | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 3338ddbcf..033261df8 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -2423,13 +2423,13 @@ Default: - +pass:[userscript:_qute_stylesheet]+: -* +pass:[Refused to apply inline style because it violates the following Content Security Policy directive: *]+ +* +pass:[*Refused to apply inline style because it violates the following Content Security Policy directive: *]+ [[content.javascript.log_message.levels]] === content.javascript.log_message.levels Javascript message sources/levels to show in the qutebrowser UI. When a JavaScript message is logged from a location matching the glob pattern given in the key, and is from one of the levels listed as value, it's surfaced as a message in the qutebrowser UI. -By default, errors happening in qutebrowser internally or in userscripts are shown to the user. +By default, errors happening in qutebrowser internally are shown to the user. Type: <> @@ -2441,6 +2441,7 @@ Default: - +pass:[userscript:*]+: * +pass:[error]+ +- +pass:[userscript:GM-*]+: empty [[content.javascript.modal_dialog]] === content.javascript.modal_dialog diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index f39040140..6600399bd 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -946,12 +946,14 @@ content.javascript.log_message.levels: keytype: String valtype: name: FlagList + none_ok: true valid_values: - info: Show JS info as messages. - warning: Show JS warnings as messages. - error: Show JS errors as messages. default: "qute:*": ["error"] + "userscript:GM-*": [] "userscript:*": ["error"] desc: >- Javascript message sources/levels to show in the qutebrowser UI. @@ -960,8 +962,8 @@ content.javascript.log_message.levels: pattern given in the key, and is from one of the levels listed as value, it's surfaced as a message in the qutebrowser UI. - By default, errors happening in qutebrowser internally or in userscripts are - shown to the user. + By default, errors happening in qutebrowser internally are shown to the + user. content.javascript.log_message.excludes: type: @@ -973,7 +975,7 @@ content.javascript.log_message.excludes: valtype: String default: "userscript:_qute_stylesheet": - - "Refused to apply inline style because it violates the following Content + - "*Refused to apply inline style because it violates the following Content Security Policy directive: *" desc: >- Javascript messages to *not* show in the UI, despite a corresponding -- cgit v1.2.3-54-g00ecf