aboutsummaryrefslogtreecommitdiffstats
path: root/tinyurl.js
diff options
context:
space:
mode:
authorhogelog2008-12-17 01:57:29 +0000
committerhogelog2008-12-17 01:57:29 +0000
commitab1a997b2b5ad38823bdb1f783ff7079ef0fa418 (patch)
treebe7b80b06447520fe3bd89a69ab3790fde770f60 /tinyurl.js
parentdbcf68ae59ea7f0397f0134dac4e31c6652680a3 (diff)
downloadvimperator-plugins-ab1a997b2b5ad38823bdb1f783ff7079ef0fa418.tar.bz2
* use util.copyToClipboard(url, true)
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@26913 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'tinyurl.js')
-rw-r--r--tinyurl.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/tinyurl.js b/tinyurl.js
index 8c8e132..834237d 100644
--- a/tinyurl.js
+++ b/tinyurl.js
@@ -27,19 +27,14 @@ plugins.tinyurl.getExpand(url):
(function() {
const TinyAPI = 'http://tinyurl.com/api-create.php?url=';
- function echopy(str)
- {
- liberator.echo(str);
- util.copyToClipboard(str);
- }
commands.add(['tinyurl'], 'echo and copy TinyURL',
- function(args) echopy(tiny.getTiny(args.length==0 ? buffer.URL : args.string)),
+ function(args) util.copyToClipboard(tiny.getTiny(args.length==0 ? buffer.URL : args.string), true),
{
argCount: '?',
});
commands.add(['expandurl'], 'expand TinyURL',
- function(args) echopy(tiny.getExpand(args.string)),
+ function(args) util.copyToClipboard(tiny.getExpand(args.string), true),
{
argCount: '1',
});