From 6c6dc23f97f485fede0b8d91c06c37490f890320 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 13 Oct 2018 22:27:58 +0900 Subject: [PATCH] Remove adjacenttab --- QA.md | 2 -- README.md | 15 +-------------- src/background/presenters/tab.js | 12 ------------ src/background/usecases/link.js | 9 +-------- src/shared/settings/default.js | 1 - src/shared/settings/properties.js | 3 --- 6 files changed, 2 insertions(+), 40 deletions(-) diff --git a/QA.md b/QA.md index d8f7e16..b24caf9 100644 --- a/QA.md +++ b/QA.md @@ -50,8 +50,6 @@ The behaviors of the console are tested in [Console section](#consoles). - [ ] Open new tab in background by `"background": true` - [ ] Configure custom hint character by `:set hintchars=012345678` - [ ] Configure custom hint character by settings `"hintchars": "012345678"` in add-on preferences -- [ ] Configure adjacent tab by `:set adjacenttab` -- [ ] Configure adjacent tab by settings `adjacenttab: true` in add-on preferences - [ ] Opened tabs is in child on Tree Style Tab ### Consoles diff --git a/README.md b/README.md index ea4fce5..586b42c 100644 --- a/README.md +++ b/README.md @@ -193,7 +193,7 @@ settings: ```json { "properties": { - "adjacenttab": false + "complete": "sbh" } } ``` @@ -219,19 +219,6 @@ Set hint characters :set hintchars=0123456789 ``` -#### `adjacenttab` property - -Open a new tab on adjacent of the current tab. - -``` -:set noadjacenttab " open a tab at last -:set adjacenttab " open a tab adjacently -``` - -For developers and contributors: you can look at -[#303](https://github.com/ueokande/vim-vixen/pull/303) for more details about -properties implementation and usage. - ### Search engines Vim Vixen supports search by search engines like Google and Yahoo. diff --git a/src/background/presenters/tab.js b/src/background/presenters/tab.js index bacb644..69cae1c 100644 --- a/src/background/presenters/tab.js +++ b/src/background/presenters/tab.js @@ -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); } diff --git a/src/background/usecases/link.js b/src/background/usecases/link.js index af152fe..b8ed719 100644 --- a/src/background/usecases/link.js +++ b/src/background/usecases/link.js @@ -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 }); diff --git a/src/shared/settings/default.js b/src/shared/settings/default.js index 9ba2d64..4163064 100644 --- a/src/shared/settings/default.js +++ b/src/shared/settings/default.js @@ -74,7 +74,6 @@ export default { "properties": { "hintchars": "abcdefghijklmnopqrstuvwxyz", "smoothscroll": false, - "adjacenttab": true, "complete": "sbh" }, "blacklist": [ diff --git a/src/shared/settings/properties.js b/src/shared/settings/properties.js index 284de6c..96f10ac 100644 --- a/src/shared/settings/properties.js +++ b/src/shared/settings/properties.js @@ -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', };