From 3b836d34836e90d4cdf7ddbadc91c89c27ea51fa Mon Sep 17 00:00:00 2001 From: Artur Shaikhullin Date: Fri, 29 Dec 2017 17:56:16 +0600 Subject: [PATCH] Fix lint warnings --- qutebrowser/browser/commands.py | 6 ++++-- qutebrowser/javascript/webengine_caret.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index d3f865a52..653d70014 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1293,9 +1293,11 @@ class CommandDispatcher: env['QUTE_URL'] = url.toString(QUrl.FullyEncoded) try: + args = self.userscript_object['args'] + verbose = self.userscript_object['verbose'] userscripts.run_async(tab, self.userscript_object['cmd'], - *self.userscript_object['args'], win_id=self._win_id, - env=env, verbose=self.userscript_object['verbose']) + *args, win_id=self._win_id, + env=env, verbose=verbose) except userscripts.Error as e: raise cmdexc.CommandError(e) finally: diff --git a/qutebrowser/javascript/webengine_caret.js b/qutebrowser/javascript/webengine_caret.js index af381f529..be0d6eaa5 100644 --- a/qutebrowser/javascript/webengine_caret.js +++ b/qutebrowser/javascript/webengine_caret.js @@ -965,7 +965,7 @@ window._qutebrowser.caret = (function() { // eslint-disable-line max-statements, window.caretBrowsingLoaded = true; CaretBrowsing.init(); - if (document.body && + if (document.body && document.body.getAttribute("caretbrowsing") === "on") { CaretBrowsing.forceEnabled = true; CaretBrowsing.isEnabled = true;