diff options
| author | ilya | 2010-01-03 23:27:08 -0800 |
|---|---|---|
| committer | ilya | 2010-01-03 23:27:08 -0800 |
| commit | 684715730414a26a8177d65730908acc0440158a (patch) | |
| tree | da3988bead413fe649f2ed97861f9dff60d6d731 /vimiumFrontend.js | |
| parent | 48fadb34a0cb596d69655e6979f9292084d3a0b2 (diff) | |
| download | vimium-684715730414a26a8177d65730908acc0440158a.tar.bz2 | |
Implement 'y' -- yank (copy) the current tab's url to the clipboard.
Diffstat (limited to 'vimiumFrontend.js')
| -rw-r--r-- | vimiumFrontend.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vimiumFrontend.js b/vimiumFrontend.js index c055981d..ff6957bb 100644 --- a/vimiumFrontend.js +++ b/vimiumFrontend.js @@ -213,6 +213,14 @@ function toggleViewSource() { getCurrentUrlPort.postMessage({}); } +function copyCurrentUrl() { + getCurrentUrlHandlers.push(function (url) { Clipboard.copy(url); }); + + // TODO(ilya): Convert to sendRequest. + var getCurrentUrlPort = chrome.extension.connect({ name: "getCurrentTabUrl" }); + getCurrentUrlPort.postMessage({}); +} + function toggleViewSourceCallback(url) { if (url.substr(0, 12) == "view-source:") { |
