From 127e94836e5ec708b2c28efe2578a989e8c2cb28 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 25 Nov 2017 13:22:27 +0900 Subject: Add badges to READM --- README.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index e8a9835..574a845 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Vim Vixen +[![Join the chat room on Gitter for vim-vixen/vim-vixen](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vim-vixen/vim-vixen) +[![Build Status](https://travis-ci.org/ueokande/vim-vixen.svg?branch=kaizen)](https://travis-ci.org/ueokande/vim-vixen) + Vim Vixen is a Firefox add-on which allows you to navigate with keyboard on the browser. Firefox started to support WebExtensions API and will stop supporting add-ons using legacy APIs from version 57. For this reason, many legacy add-ons do not work on Firefox 57. -- cgit v1.2.3 From 848b3c097ffb920f2982c3cefd3e58bc7b8029b3 Mon Sep 17 00:00:00 2001 From: Daniel Campoverde Date: Sun, 5 Nov 2017 18:48:58 -0500 Subject: Document TAB_PREV_SEL operation --- README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'README.md') diff --git a/README.md b/README.md index 574a845..2756d82 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ The default mappings are as follows: - u: reopen close tab - K, J: select prev or next tab - g0, g$: select first or last tab +- Ctrl+^: select previous selected tab - r: reload current tab - R: reload current tab without cache - zp: toggle pin/unpin current tab -- cgit v1.2.3 From 718ed5bdb495adae5efd516c992239b1d2f20cad Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 25 Nov 2017 22:30:42 +0900 Subject: add david-dm badge --- README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'README.md') diff --git a/README.md b/README.md index 574a845..10878b8 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Join the chat room on Gitter for vim-vixen/vim-vixen](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vim-vixen/vim-vixen) [![Build Status](https://travis-ci.org/ueokande/vim-vixen.svg?branch=kaizen)](https://travis-ci.org/ueokande/vim-vixen) +[![devDependencies Status](https://david-dm.org/ueokande/vim-vixen/dev-status.svg)](https://david-dm.org/ueokande/vim-vixen?type=dev) Vim Vixen is a Firefox add-on which allows you to navigate with keyboard on the browser. Firefox started to support WebExtensions API and will stop supporting add-ons using legacy APIs from version 57. -- cgit v1.2.3 From f2c7f9a2daebc47335a2ccfe2d2396c637fa1c50 Mon Sep 17 00:00:00 2001 From: YourFin Date: Wed, 6 Dec 2017 15:25:24 -0600 Subject: Fix grammar: histories -> history --- QA.md | 4 ++-- README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/QA.md b/QA.md index 404f50f..2579df8 100644 --- a/QA.md +++ b/QA.md @@ -35,7 +35,7 @@ The behaviors of the console are tested in [Console section](#consoles). #### Navigation -- [ ] H, L: go back and forward in histories +- [ ] H, L: go back and forward in history - [ ] [[, ]]: Open next/prev link in `` tags. - [ ] [[, ]]: find prev and next links and open it - [ ] gu: go to parent directory @@ -83,7 +83,7 @@ The behaviors of the console are tested in [Console section](#consoles). #### Navigation -- [ ] H, L: go back and forward in histories +- [ ] H, L: go back and forward in history - [ ] [[, ]]: Open next/prev link in `` tags. - [ ] [[, ]]: find prev and next links and open it - [ ] gu: go to parent directory diff --git a/README.md b/README.md index 10878b8..fdc48d4 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,8 @@ The default mappings are as follows: ### Navigation - f: start following links in the page -- H: go back in histories -- L: go forward in histories +- H: go back in history +- L: go forward in history - [[, ]]: find prev or next links and open it - gu: go to parent directory - gU: go to root directory -- cgit v1.2.3 From 54a7662cd1e7372910e9ce81aae1a904f3b26c82 Mon Sep 17 00:00:00 2001 From: usk Date: Wed, 3 Jan 2018 07:19:25 +0900 Subject: open clipboard's URL in current/new tab --- QA.md | 2 ++ README.md | 2 ++ manifest.json | 3 ++- src/content/actions/operation.js | 2 ++ src/content/urls.js | 26 +++++++++++++++++++++++++- src/settings/components/form/keymaps-form.jsx | 2 ++ src/shared/operations.js | 3 ++- src/shared/settings/default.js | 2 ++ 8 files changed, 39 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/QA.md b/QA.md index 1a0839e..1c06861 100644 --- a/QA.md +++ b/QA.md @@ -46,6 +46,8 @@ The behaviors of the console are tested in [Console section](#consoles). - [ ] zi, zo: zoom-in and zoom-out - [ ] zz: set zoom level as default - [ ] y: yank current URL and show a message +- [ ] p: open clipbord's URL in current tab +- [ ] P: open clipbord's URL in new tab - [ ] Toggle enabled/disabled of plugin bu Shift+Esc ### Following links diff --git a/README.md b/README.md index fdc48d4..a249ada 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,8 @@ The default mappings are as follows: - zi, zo: zoom-in/zoom-out - zz: Set default zoom level - y: copy URL in current tab +- p: open clipbord's URL in current tab +- P: open clipbord's URL in new tab - Shift+Esc: enable or disable the add-on in current tab. ### Console commands diff --git a/manifest.json b/manifest.json index 78479c2..02d8589 100644 --- a/manifest.json +++ b/manifest.json @@ -30,7 +30,8 @@ "history", "sessions", "storage", - "tabs" + "tabs", + "clipboardRead" ], "web_accessible_resources": [ "build/console.html", diff --git a/src/content/actions/operation.js b/src/content/actions/operation.js index 767f14b..0a5cd97 100644 --- a/src/content/actions/operation.js +++ b/src/content/actions/operation.js @@ -60,6 +60,8 @@ const exec = (operation) => { type: messages.CONSOLE_SHOW_INFO, text: 'Current url yanked', }); + case operations.URLS_PASTE: + return urls.paste(window, operation.newTab ? operation.newTab : false); default: browser.runtime.sendMessage({ type: messages.BACKGROUND_OPERATION, diff --git a/src/content/urls.js b/src/content/urls.js index 8f8a1ac..9b7b284 100644 --- a/src/content/urls.js +++ b/src/content/urls.js @@ -1,3 +1,5 @@ +import messages from 'shared/messages'; + const yank = (win) => { let input = win.document.createElement('input'); win.document.body.append(input); @@ -12,4 +14,26 @@ const yank = (win) => { input.remove(); }; -export { yank }; +const paste = (win, newTab) => { + let textarea = win.document.createElement('textarea'); + win.document.body.append(textarea); + + textarea.style.position = 'fixed'; + textarea.style.top = '-100px'; + textarea.contentEditable = 'true'; + textarea.focus(); + + if (win.document.execCommand('paste')) { + if (/^(https?|ftp):\/\//.test(textarea.textContent)) { + browser.runtime.sendMessage({ + type: messages.OPEN_URL, + url: textarea.textContent, + newTab: newTab ? newTab : false, + }); + } + } + + textarea.remove(); +}; + +export { yank, paste }; diff --git a/src/settings/components/form/keymaps-form.jsx b/src/settings/components/form/keymaps-form.jsx index c399570..eb77e52 100644 --- a/src/settings/components/form/keymaps-form.jsx +++ b/src/settings/components/form/keymaps-form.jsx @@ -52,6 +52,8 @@ const KeyMapFields = [ ], [ ['addon.toggle.enabled', 'Enable or disable'], ['urls.yank', 'Copy current URL'], + ['urls.paste?{"newTab":false}', 'Open clipboard\'s URL in current tab'], + ['urls.paste?{"newTab":true}', 'Open clipboard\'s URL in new tab'], ['zoom.in', 'Zoom-in'], ['zoom.out', 'Zoom-out'], ['zoom.neutral', 'Reset zoom level'], diff --git a/src/shared/operations.js b/src/shared/operations.js index 4c221ba..7334369 100644 --- a/src/shared/operations.js +++ b/src/shared/operations.js @@ -49,8 +49,9 @@ export default { ZOOM_OUT: 'zoom.out', ZOOM_NEUTRAL: 'zoom.neutral', - // Url yank + // Url yank/paste URLS_YANK: 'urls.yank', + URLS_PASTE: 'urls.paste', // Find FIND_START: 'find.start', diff --git a/src/shared/settings/default.js b/src/shared/settings/default.js index d187565..6b71717 100644 --- a/src/shared/settings/default.js +++ b/src/shared/settings/default.js @@ -44,6 +44,8 @@ export default { "gu": { "type": "navigate.parent" }, "gU": { "type": "navigate.root" }, "y": { "type": "urls.yank" }, + "p": { "type": "urls.paste", "newTab": false }, + "P": { "type": "urls.paste", "newTab": true }, "/": { "type": "find.start" }, "n": { "type": "find.next" }, "N": { "type": "find.prev" }, -- cgit v1.2.3 From 03e7e333a3183ea7bf10938c2650b1d74362589f Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 13 Jan 2018 23:11:15 +0900 Subject: update README --- README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'README.md') diff --git a/README.md b/README.md index a249ada..ca507d0 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ The default mappings are as follows: - [[, ]]: find prev or next links and open it - gu: go to parent directory - gU: go to root directory +- gi, G: focus first input #### Misc - zi, zo: zoom-in/zoom-out -- cgit v1.2.3 From 050b21704828e2be4fd4a922eb7162037d3fa331 Mon Sep 17 00:00:00 2001 From: Daniel Campoverde Date: Sat, 13 Jan 2018 19:18:56 -0500 Subject: Document with actual keys --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 2756d82..2228f69 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ The default mappings are as follows: - u: reopen close tab - K, J: select prev or next tab - g0, g$: select first or last tab -- Ctrl+^: select previous selected tab +- Ctrl+6: select previous selected tab - r: reload current tab - R: reload current tab without cache - zp: toggle pin/unpin current tab -- cgit v1.2.3 From 3796b7de0d181d01747160d3b2082f78bb456b1e Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Thu, 18 Jan 2018 20:15:49 +0900 Subject: fix README --- QA.md | 8 ++++---- README.md | 23 ++++++++++++++++++++++- 2 files changed, 26 insertions(+), 5 deletions(-) (limited to 'README.md') diff --git a/QA.md b/QA.md index 97549ff..a7a0c01 100644 --- a/QA.md +++ b/QA.md @@ -14,7 +14,7 @@ Test operations with default key maps. - [ ] gg, G: scroll to top and bottom - [ ] Smooth scroll by `:set smoothscroll` - [ ] Non-smooth scroll by `:set nosmoothscroll` -- [ ] Configure custom hint character by settings `smoothscroll` +- [ ] Configure custom hint character by settings `"smoothscroll": true`, `"smoothscroll": false` #### Console @@ -67,8 +67,8 @@ The behaviors of the console are tested in [Console section](#consoles). - [ ] Select link and open it in the frame in `