aboutsummaryrefslogtreecommitdiffstats
path: root/tinyurl.js
diff options
context:
space:
mode:
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',
});