From 736914648db0555c3d3db7eba751769ebc97b369 Mon Sep 17 00:00:00 2001 From: drry Date: Sun, 18 Jan 2009 15:05:57 +0000 Subject: * 語句を修正しました。 * ほか。 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@28623 d0d07461-0603-4401-acd4-de1884942a52 --- hash.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'hash.js') diff --git a/hash.js b/hash.js index dc033a2..bcca175 100644 --- a/hash.js +++ b/hash.js @@ -24,10 +24,10 @@ hash: let Algos = [ ["md2", "MD2 Algorithm"], ["md5", "MD5 Algorithm"], - ["sha1", "SHA1 Algorithm"], - ["sha256", "SHA256 Algorithm"], - ["sha384", "SHA385 Algorithm"], - ["sha512", "SHA512 Algorithm"], + ["sha1", "SHA-1 Algorithm"], + ["sha256", "SHA-256 Algorithm"], + ["sha384", "SHA-385 Algorithm"], + ["sha512", "SHA-512 Algorithm"], ]; function getStream(path) @@ -47,9 +47,9 @@ hash: commands.addUserCommand(["hash"], "hash of file", - function(args){ + function(args) { if (args.length!=2) { - + liberator.echo("usage \":hash md2|md5|sha1|sha256|sha384|sha512 file-path\""); return false; } @@ -67,13 +67,13 @@ hash: let hash = Crypt.finish(false); // convert the binary hash data to a hex string. - let str = [toHexString(hash.charCodeAt(i)) for(i in hash)].join(""); + let str = [toHexString(hash.charCodeAt(i)) for (i in hash)].join(""); util.copyToClipboard(str, true); }, { bang: true, - completer: function (context){ - let args = context.value.split(/\s/); + completer: function (context) { + let args = context.value.split(/\s+/); if (args.length<=2) { context.title = "hash algorithm"; context.completions = Algos; -- cgit v1.2.3