summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-06-22 14:38:29 +0200
committerFlorian Bruhin <me@the-compiler.org>2020-06-22 20:08:56 +0200
commitad3b278813e77007dd3206d6c146dd8bddce8dc0 (patch)
treedd266e748389f0357a07c4b4463c3be8d67d8354
parentd88ad0ccb637b1feb450923fa11f055946cc3e7b (diff)
downloadqutebrowser-ad3b278813e77007dd3206d6c146dd8bddce8dc0.tar.gz
qutebrowser-ad3b278813e77007dd3206d6c146dd8bddce8dc0.zip
Rename :inspector to :devtools
The general consensus seems to be that the inspector is the first tab of the devtools, and Chromium also calls them devtools everywhere. Closes #5438
-rw-r--r--doc/help/commands.asciidoc22
-rw-r--r--doc/help/settings.asciidoc4
-rw-r--r--doc/qutebrowser.1.asciidoc2
-rw-r--r--qutebrowser/components/misccommands.py15
-rw-r--r--qutebrowser/config/configdata.yml4
-rw-r--r--qutebrowser/qutebrowser.py14
6 files changed, 34 insertions, 27 deletions
diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc
index 04e39c280..017f4b20b 100644
--- a/doc/help/commands.asciidoc
+++ b/doc/help/commands.asciidoc
@@ -51,6 +51,7 @@ possible to run or bind multiple commands by separating them with `;;`.
|<<config-source,config-source>>|Read a config.py file.
|<<config-unset,config-unset>>|Unset an option.
|<<config-write-py,config-write-py>>|Write the current configuration to a config.py file.
+|<<devtools,devtools>>|Toggle the developer tools (web inspector).
|<<download,download>>|Download a given URL, or current page if no URL given.
|<<download-cancel,download-cancel>>|Cancel the last/[count]th download.
|<<download-clear,download-clear>>|Remove all finished downloads from the list.
@@ -72,7 +73,6 @@ possible to run or bind multiple commands by separating them with `;;`.
|<<history-clear,history-clear>>|Clear all browsing history.
|<<home,home>>|Open main startpage in current tab.
|<<insert-text,insert-text>>|Insert text at cursor position.
-|<<inspector,inspector>>|Toggle the web inspector.
|<<jseval,jseval>>|Evaluate a JavaScript string.
|<<jump-mark,jump-mark>>|Jump to the mark named by `key`.
|<<later,later>>|Execute a command after some time.
@@ -413,6 +413,16 @@ Write the current configuration to a config.py file.
* +*-f*+, +*--force*+: Force overwriting existing files.
* +*-d*+, +*--defaults*+: Write the defaults instead of values configured via :set.
+[[devtools]]
+=== devtools
+Syntax: +:devtools ['position']+
+
+Toggle the developer tools (web inspector).
+
+==== positional arguments
+* +'position'+: Where to open the devtools (right/left/top/bottom/window).
+
+
[[download]]
=== download
Syntax: +:download [*--mhtml*] [*--dest* 'dest'] ['url']+
@@ -725,16 +735,6 @@ Insert text at cursor position.
==== note
* This command does not split arguments after the last argument and handles quotes literally.
-[[inspector]]
-=== inspector
-Syntax: +:inspector ['position']+
-
-Toggle the web inspector.
-
-==== positional arguments
-* +'position'+: Where to open the inspector (right/left/top/bottom/window).
-
-
[[jseval]]
=== jseval
Syntax: +:jseval [*--file*] [*--quiet*] [*--world* 'world'] 'js-code'+
diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc
index 0b4f3d421..214b7cee2 100644
--- a/doc/help/settings.asciidoc
+++ b/doc/help/settings.asciidoc
@@ -686,7 +686,7 @@ Default:
* +pass:[wb]+: +pass:[set-cmd-text -s :quickmark-load -w]+
* +pass:[wf]+: +pass:[hint all window]+
* +pass:[wh]+: +pass:[back -w]+
-* +pass:[wi]+: +pass:[inspector]+
+* +pass:[wi]+: +pass:[devtools]+
* +pass:[wl]+: +pass:[forward -w]+
* +pass:[wo]+: +pass:[set-cmd-text -s :open -w]+
* +pass:[wp]+: +pass:[open -w -- {clipboard}]+
@@ -2570,7 +2570,7 @@ On QtWebKit, this setting is unavailable.
[[content.xss_auditing]]
=== content.xss_auditing
Monitor load requests for cross-site scripting attempts.
-Suspicious scripts will be blocked and reported in the inspector's JavaScript console.
+Suspicious scripts will be blocked and reported in the devtools JavaScript console.
Note that bypasses for the XSS auditor are widely known and it can be abused for cross-site info leaks in some scenarios, see: https://www.chromium.org/developers/design-documents/xss-auditor
This setting supports URL patterns.
diff --git a/doc/qutebrowser.1.asciidoc b/doc/qutebrowser.1.asciidoc
index 8dae3eaef..1f8a85387 100644
--- a/doc/qutebrowser.1.asciidoc
+++ b/doc/qutebrowser.1.asciidoc
@@ -63,7 +63,7 @@ show it.
Which backend to use.
*--enable-webengine-inspector*::
- Enable the web inspector for QtWebEngine. Note that this is a SECURITY RISK and you should not visit untrusted websites with the inspector turned on. See https://bugreports.qt.io/browse/QTBUG-50725 for more details. This is not needed anymore since Qt 5.11 where the inspector is always enabled and secure.
+ Enable the web inspector / devtools for QtWebEngine. Note that this is a SECURITY RISK and you should not visit untrusted websites with the inspector turned on. See https://bugreports.qt.io/browse/QTBUG-50725 for moredetails. This is not needed anymore since Qt 5.11where the inspector is always enabled and secure.
=== debug arguments
*-l* '{critical,error,warning,info,debug,vdebug}', *--loglevel* '{critical,error,warning,info,debug,vdebug}'::
diff --git a/qutebrowser/components/misccommands.py b/qutebrowser/components/misccommands.py
index e71d4ddb1..98cb081af 100644
--- a/qutebrowser/components/misccommands.py
+++ b/qutebrowser/components/misccommands.py
@@ -317,15 +317,22 @@ def debug_trace(expr: str = "") -> None:
@cmdutils.register()
@cmdutils.argument('tab', value=cmdutils.Value.cur_tab)
-def inspector(tab: apitypes.Tab,
- position: apitypes.InspectorPosition = None) -> None:
- """Toggle the web inspector.
+def devtools(tab: apitypes.Tab,
+ position: apitypes.InspectorPosition = None) -> None:
+ """Toggle the developer tools (web inspector).
Args:
- position: Where to open the inspector
+ position: Where to open the devtools
(right/left/top/bottom/window).
"""
try:
tab.private_api.toggle_inspector(position)
except apitypes.InspectorError as e:
raise cmdutils.CommandError(e)
+
+
+@cmdutils.register(deprecated='Use :devtools instead')
+@cmdutils.argument('tab', value=cmdutils.Value.cur_tab)
+def inspector(tab: apitypes.Tab) -> None:
+ """Toggle the web inspector."""
+ devtools(tab)
diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml
index 146e98f97..b4462e5d9 100644
--- a/qutebrowser/config/configdata.yml
+++ b/qutebrowser/config/configdata.yml
@@ -884,7 +884,7 @@ content.xss_auditing:
desc: >-
Monitor load requests for cross-site scripting attempts.
- Suspicious scripts will be blocked and reported in the inspector's
+ Suspicious scripts will be blocked and reported in the devtools
JavaScript console.
Note that bypasses for the XSS auditor are widely known and it can be
@@ -3130,7 +3130,7 @@ bindings.default:
gU: navigate up -t
<Ctrl-A>: navigate increment
<Ctrl-X>: navigate decrement
- wi: inspector
+ wi: devtools
gd: download
ad: download-cancel
cd: download-clear
diff --git a/qutebrowser/qutebrowser.py b/qutebrowser/qutebrowser.py
index 8765f5217..124da3b28 100644
--- a/qutebrowser/qutebrowser.py
+++ b/qutebrowser/qutebrowser.py
@@ -83,13 +83,13 @@ def get_argparser():
parser.add_argument('--backend', choices=['webkit', 'webengine'],
help="Which backend to use.")
parser.add_argument('--enable-webengine-inspector', action='store_true',
- help="Enable the web inspector for QtWebEngine. Note "
- "that this is a SECURITY RISK and you should not "
- "visit untrusted websites with the inspector turned "
- "on. See https://bugreports.qt.io/browse/QTBUG-50725 "
- "for more details. This is not needed anymore since "
- "Qt 5.11 where the inspector is always enabled and "
- "secure.")
+ help="Enable the web inspector / devtools for "
+ "QtWebEngine. Note that this is a SECURITY RISK and "
+ "you should not visit untrusted websites with the "
+ "inspector turned on. See "
+ "https://bugreports.qt.io/browse/QTBUG-50725 for more"
+ "details. This is not needed anymore since Qt 5.11"
+ "where the inspector is always enabled and secure.")
parser.add_argument('--json-args', help=argparse.SUPPRESS)
parser.add_argument('--temp-basedir-restarted', help=argparse.SUPPRESS)