From aebc1a7d48b9583ee4b246dbfb6b1afcba91048e Mon Sep 17 00:00:00 2001 From: Jimmy Date: Sat, 20 Jan 2018 13:34:51 +1300 Subject: [PATCH] Greasemonkey: don't complain about an unset run-at Apparently is is not an unusual situation to leave it unset and rely on the default. Logging a warning about this could be unnecerasily confusing for users. I'm leaving the log message in there if it is set to something weird like `window-load` or `document-complete` which scriptish may support. --- qutebrowser/browser/greasemonkey.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qutebrowser/browser/greasemonkey.py b/qutebrowser/browser/greasemonkey.py index 8a9624148..7ee843b0b 100644 --- a/qutebrowser/browser/greasemonkey.py +++ b/qutebrowser/browser/greasemonkey.py @@ -177,10 +177,10 @@ class GreasemonkeyManager(QObject): elif script.run_at == 'document-idle': self._run_idle.append(script) else: - log.greasemonkey.warning("Script {} has invalid run-at " - "defined, defaulting to " - "document-end" - .format(script_path)) + if script.run_at: + log.greasemonkey.warning( + "Script {} has invalid run-at defined, " + "defaulting to document-end".format(script_path)) # Default as per # https://wiki.greasespot.net/Metadata_Block#.40run-at self._run_end.append(script)