Remove adjacenttab
This commit is contained in:
parent
8b72aac09a
commit
6c6dc23f97
6 changed files with 2 additions and 40 deletions
|
@ -85,18 +85,6 @@ export default class TabPresenter {
|
|||
return browser.tabs.setZoom(tabId, factor);
|
||||
}
|
||||
|
||||
async createAdjacent(url, { openerTabId, active }) {
|
||||
let tabs = await browser.tabs.query({
|
||||
active: true, currentWindow: true
|
||||
});
|
||||
return browser.tabs.create({
|
||||
url,
|
||||
openerTabId,
|
||||
active,
|
||||
index: tabs[0].index + 1
|
||||
});
|
||||
}
|
||||
|
||||
onSelected(listener) {
|
||||
browser.tabs.onActivated.addListener(listener);
|
||||
}
|
||||
|
|
|
@ -11,14 +11,7 @@ export default class LinkInteractor {
|
|||
return this.tabPresenter.open(url, tabId);
|
||||
}
|
||||
|
||||
async openNewTab(url, openerId, background) {
|
||||
let settings = await this.settingRepository.get();
|
||||
let { adjacenttab } = settings.properties;
|
||||
if (adjacenttab) {
|
||||
return this.tabPresenter.createAdjacent(url, {
|
||||
openerTabId: openerId, active: !background
|
||||
});
|
||||
}
|
||||
openNewTab(url, openerId, background) {
|
||||
return this.tabPresenter.create(url, {
|
||||
openerTabId: openerId, active: !background
|
||||
});
|
||||
|
|
Reference in a new issue