Remove adjacenttab

This commit is contained in:
Shin'ya Ueoka 2018-10-13 22:27:58 +09:00
parent 8b72aac09a
commit 6c6dc23f97
6 changed files with 2 additions and 40 deletions

View file

@ -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);
}

View file

@ -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
});

View file

@ -74,7 +74,6 @@ export default {
"properties": {
"hintchars": "abcdefghijklmnopqrstuvwxyz",
"smoothscroll": false,
"adjacenttab": true,
"complete": "sbh"
},
"blacklist": [

View file

@ -5,7 +5,6 @@
const types = {
hintchars: 'string',
smoothscroll: 'boolean',
adjacenttab: 'boolean',
complete: 'string',
};
@ -13,14 +12,12 @@ const types = {
const defaults = {
hintchars: 'abcdefghijklmnopqrstuvwxyz',
smoothscroll: false,
adjacenttab: true,
complete: 'sbn',
};
const docs = {
hintchars: 'hint characters on follow mode',
smoothscroll: 'smooth scroll',
adjacenttab: 'open adjacent tabs',
complete: 'which are completed at the open page',
};