implement opening logger with kbd shortcut

This commit is contained in:
gorhill 2017-05-28 09:40:26 -04:00
parent dcb02fe6d4
commit 78d9c4d1c5
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
3 changed files with 21 additions and 0 deletions

View File

@ -16,6 +16,12 @@
"default": "Alt+X" "default": "Alt+X"
}, },
"description": "__MSG_popupTipPicker__" "description": "__MSG_popupTipPicker__"
},
"launch-logger": {
"suggested_key": {
"default": "Alt+L"
},
"description": "__MSG_popupTipLog__"
} }
}, },
"default_locale": "en", "default_locale": "en",

View File

@ -23,6 +23,12 @@
"default": "Alt+X" "default": "Alt+X"
}, },
"description": "__MSG_popupTipPicker__" "description": "__MSG_popupTipPicker__"
},
"launch-logger": {
"suggested_key": {
"default": "Alt+L"
},
"description": "__MSG_popupTipLog__"
} }
}, },
"default_locale": "en", "default_locale": "en",

View File

@ -42,6 +42,15 @@
µb.elementPickerExec(tab.id, undefined, command === 'launch-element-zapper'); µb.elementPickerExec(tab.id, undefined, command === 'launch-element-zapper');
}); });
break; 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: default:
break; break;
} }