Remove adjacenttab

jh-changes
Shin'ya Ueoka 6 years ago
parent 8b72aac09a
commit 6c6dc23f97
  1. 2
      QA.md
  2. 15
      README.md
  3. 12
      src/background/presenters/tab.js
  4. 9
      src/background/usecases/link.js
  5. 1
      src/shared/settings/default.js
  6. 3
      src/shared/settings/properties.js

@ -50,8 +50,6 @@ The behaviors of the console are tested in [Console section](#consoles).
- [ ] Open new tab in background by `"background": true` - [ ] Open new tab in background by `"background": true`
- [ ] Configure custom hint character by `:set hintchars=012345678` - [ ] Configure custom hint character by `:set hintchars=012345678`
- [ ] Configure custom hint character by settings `"hintchars": "012345678"` in add-on preferences - [ ] 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 - [ ] Opened tabs is in child on Tree Style Tab
### Consoles ### Consoles

@ -193,7 +193,7 @@ settings:
```json ```json
{ {
"properties": { "properties": {
"adjacenttab": false "complete": "sbh"
} }
} }
``` ```
@ -219,19 +219,6 @@ Set hint characters
:set hintchars=0123456789 :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 ### Search engines
Vim Vixen supports search by search engines like Google and Yahoo. Vim Vixen supports search by search engines like Google and Yahoo.

@ -85,18 +85,6 @@ export default class TabPresenter {
return browser.tabs.setZoom(tabId, factor); 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) { onSelected(listener) {
browser.tabs.onActivated.addListener(listener); browser.tabs.onActivated.addListener(listener);
} }

@ -11,14 +11,7 @@ export default class LinkInteractor {
return this.tabPresenter.open(url, tabId); return this.tabPresenter.open(url, tabId);
} }
async openNewTab(url, openerId, background) { 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
});
}
return this.tabPresenter.create(url, { return this.tabPresenter.create(url, {
openerTabId: openerId, active: !background openerTabId: openerId, active: !background
}); });

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

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