From 9f691e05aae8b0ad1c4f3fe559b0f2f2c9559ea2 Mon Sep 17 00:00:00 2001 From: anekos Date: Thu, 27 Aug 2009 12:37:51 +0000 Subject: Follow HEAD for http://vimperator.org/trac/gitweb/?p=liberator.git;a=commit;h=f20c2b315bb05c2e88d0c672f07dc229cc9267d2 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@35099 d0d07461-0603-4401-acd4-de1884942a52 --- readcatlater.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'readcatlater.js') diff --git a/readcatlater.js b/readcatlater.js index bc5688b..065ab1b 100644 --- a/readcatlater.js +++ b/readcatlater.js @@ -245,7 +245,7 @@ let PLUGIN_INFO = return liberator.globalVariables.readcatlater_reverse ? result.reverse() : result; } catch (e) { liberator.log(e); } } - function completer (context, arg, bang) { + function completer (context, arg) { context.title = ['URL', 'Title']; context.completions = RCL_Bookmarks(context.filter). filter(function (it) it.id). @@ -269,11 +269,8 @@ let PLUGIN_INFO = commands.addUserCommand( ['readcatlater', 'rcl'], 'read cat later', - function (args, _, num, extra) { - // for HEAD - if (args.string != undefined) - args = args.string; - var res = addEntry(window.content.document, splitBySpaces(args)); + function (args) { + var res = addEntry(window.content.document, splitBySpaces(args.string)); if (res) liberator.echo('"' + buffer.title + '" was added'); else @@ -286,20 +283,20 @@ let PLUGIN_INFO = commands.addUserCommand( ['readcatnow', 'rcn'], 'read cat now', - function (arg, bang, num, extra) { + function (arg) { let opennum = arg['-number']; if (opennum) { liberator.log(typeof opennum) let us = RCL_Bookmarks(arg.literalArg).reverse().splice(0, opennum).map(function (it) it.URI); liberator.open(us, liberator.NEW_BACKGROUND_TAB); - if (!bang) { + if (!arg.bang) { us.forEach(removeItems); liberator.echo('[' + us + '] was removed.'); } } else { let uri = arg.string; openURI(uri); - if (!bang && removeItems(uri)) + if (!arg.bang && removeItems(uri)) liberator.echo('"' + uri + '" was removed.'); } }, @@ -314,7 +311,7 @@ let PLUGIN_INFO = commands.addUserCommand( ['deletecatnow', 'dcn'], 'delete cat now', - function (arg, bang, num, extra) { + function (arg) { let uri = arg.string; if (removeItems(uri)) liberator.echo('"' + uri + '" was removed.'); -- cgit v1.2.3