checking if devtools are supported before adding a shortcut

This commit is contained in:
antelle 2019-09-15 07:47:45 +02:00
parent e7d88cce58
commit 0028f2293f
1 changed files with 8 additions and 6 deletions

View File

@ -97,12 +97,14 @@ const AppView = Backbone.View.extend({
KeyHandler.onKey(Keys.DOM_VK_ESCAPE, this.escPressed, this);
KeyHandler.onKey(Keys.DOM_VK_BACK_SPACE, this.backspacePressed, this);
KeyHandler.onKey(
Keys.DOM_VK_I,
this.openDevTools,
this,
KeyHandler.SHORTCUT_ACTION + KeyHandler.SHORTCUT_OPT
);
if (Launcher && Launcher.devTools) {
KeyHandler.onKey(
Keys.DOM_VK_I,
this.openDevTools,
this,
KeyHandler.SHORTCUT_ACTION + KeyHandler.SHORTCUT_OPT
);
}
setInterval(this.syncAllByTimer.bind(this), Timeouts.AutoSync);