Add command.show.addbookmark operation
This commit is contained in:
parent
d0eba2546a
commit
d41c7476a6
3 changed files with 7 additions and 0 deletions
|
@ -90,6 +90,11 @@ export default class BackgroundComponent {
|
||||||
return this.sendConsoleShowCommand(tab, 'winopen ');
|
return this.sendConsoleShowCommand(tab, 'winopen ');
|
||||||
case operations.COMMAND_SHOW_BUFFER:
|
case operations.COMMAND_SHOW_BUFFER:
|
||||||
return this.sendConsoleShowCommand(tab, 'buffer ');
|
return this.sendConsoleShowCommand(tab, 'buffer ');
|
||||||
|
case operations.COMMAND_SHOW_ADDBOOKMARK:
|
||||||
|
if (operation.alter) {
|
||||||
|
return this.sendConsoleShowCommand(tab, 'addbookmark ' + tab.title);
|
||||||
|
}
|
||||||
|
return this.sendConsoleShowCommand(tab, 'addbookmark ');
|
||||||
case operations.FIND_START:
|
case operations.FIND_START:
|
||||||
return browser.tabs.sendMessage(tab.id, {
|
return browser.tabs.sendMessage(tab.id, {
|
||||||
type: messages.CONSOLE_SHOW_FIND
|
type: messages.CONSOLE_SHOW_FIND
|
||||||
|
|
|
@ -13,6 +13,7 @@ export default {
|
||||||
COMMAND_SHOW_TABOPEN: 'command.show.tabopen',
|
COMMAND_SHOW_TABOPEN: 'command.show.tabopen',
|
||||||
COMMAND_SHOW_WINOPEN: 'command.show.winopen',
|
COMMAND_SHOW_WINOPEN: 'command.show.winopen',
|
||||||
COMMAND_SHOW_BUFFER: 'command.show.buffer',
|
COMMAND_SHOW_BUFFER: 'command.show.buffer',
|
||||||
|
COMMAND_SHOW_ADDBOOKMARK: 'command.show.addbookmark',
|
||||||
|
|
||||||
// Scrolls
|
// Scrolls
|
||||||
SCROLL_VERTICALLY: 'scroll.vertically',
|
SCROLL_VERTICALLY: 'scroll.vertically',
|
||||||
|
|
|
@ -11,6 +11,7 @@ export default {
|
||||||
"w": { "type": "command.show.winopen", "alter": false },
|
"w": { "type": "command.show.winopen", "alter": false },
|
||||||
"W": { "type": "command.show.winopen", "alter": true },
|
"W": { "type": "command.show.winopen", "alter": true },
|
||||||
"b": { "type": "command.show.buffer" },
|
"b": { "type": "command.show.buffer" },
|
||||||
|
"a": { "type": "command.show.addbookmark", "alter": true },
|
||||||
"k": { "type": "scroll.vertically", "count": -1 },
|
"k": { "type": "scroll.vertically", "count": -1 },
|
||||||
"j": { "type": "scroll.vertically", "count": 1 },
|
"j": { "type": "scroll.vertically", "count": 1 },
|
||||||
"h": { "type": "scroll.horizonally", "count": -1 },
|
"h": { "type": "scroll.horizonally", "count": -1 },
|
||||||
|
|
Reference in a new issue