Merge 36b33c90cb
into abd2b73fca
This commit is contained in:
commit
acc1155cdf
2 changed files with 20 additions and 0 deletions
|
@ -177,6 +177,20 @@ const assignManager = {
|
||||||
browser.webRequest.onBeforeRequest.addListener((options) => {
|
browser.webRequest.onBeforeRequest.addListener((options) => {
|
||||||
return this.onBeforeRequest(options);
|
return this.onBeforeRequest(options);
|
||||||
},{urls: ["<all_urls>"], types: ["main_frame"]}, ["blocking"]);
|
},{urls: ["<all_urls>"], types: ["main_frame"]}, ["blocking"]);
|
||||||
|
|
||||||
|
browser.commands.onCommand.addListener(command => {
|
||||||
|
return this._onCommandHandler(command);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async _onCommandHandler(command) {
|
||||||
|
if (command === "new-tab-container") {
|
||||||
|
return browser.tabs.query({active: true, lastFocusedWindow: true}).then(tabs => {
|
||||||
|
return tabs[0];
|
||||||
|
}).then(tab => {
|
||||||
|
return browser.tabs.create({cookieStoreId: tab.cookieStoreId});
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async _onClickedHandler(info, tab) {
|
async _onClickedHandler(info, tab) {
|
||||||
|
|
|
@ -38,6 +38,12 @@
|
||||||
"mac": "MacCtrl+Period"
|
"mac": "MacCtrl+Period"
|
||||||
},
|
},
|
||||||
"description": "Open containers panel"
|
"description": "Open containers panel"
|
||||||
|
},
|
||||||
|
"new-tab-container": {
|
||||||
|
"suggested_key": {
|
||||||
|
"default": "Ctrl+Y"
|
||||||
|
},
|
||||||
|
"description": "Open new tab with the same container"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue