From 78d9c4d1c5d1f16ebe5ad82dc5666cf99d4f70f1 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 28 May 2017 09:40:26 -0400 Subject: [PATCH] implement opening logger with kbd shortcut --- platform/chromium/manifest.json | 6 ++++++ platform/webext/manifest.json | 6 ++++++ src/js/commands.js | 9 +++++++++ 3 files changed, 21 insertions(+) diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json index f31c26633..69a78231a 100644 --- a/platform/chromium/manifest.json +++ b/platform/chromium/manifest.json @@ -16,6 +16,12 @@ "default": "Alt+X" }, "description": "__MSG_popupTipPicker__" + }, + "launch-logger": { + "suggested_key": { + "default": "Alt+L" + }, + "description": "__MSG_popupTipLog__" } }, "default_locale": "en", diff --git a/platform/webext/manifest.json b/platform/webext/manifest.json index b3f875d89..72d1a14e2 100644 --- a/platform/webext/manifest.json +++ b/platform/webext/manifest.json @@ -23,6 +23,12 @@ "default": "Alt+X" }, "description": "__MSG_popupTipPicker__" + }, + "launch-logger": { + "suggested_key": { + "default": "Alt+L" + }, + "description": "__MSG_popupTipLog__" } }, "default_locale": "en", diff --git a/src/js/commands.js b/src/js/commands.js index 0efe9bfad..09a684384 100644 --- a/src/js/commands.js +++ b/src/js/commands.js @@ -42,6 +42,15 @@ µb.elementPickerExec(tab.id, undefined, command === 'launch-element-zapper'); }); break; + case 'launch-logger': + vAPI.tabs.get(null, function(tab) { + µb.openNewTab({ + url: 'logger-ui.html#tab_' + tab.id, + select: true, + index: -1 + }); + }); + break; default: break; }