diff options
author | drry | 2009-01-18 15:05:57 +0000 |
---|---|---|
committer | drry | 2009-01-18 15:05:57 +0000 |
commit | 736914648db0555c3d3db7eba751769ebc97b369 (patch) | |
tree | 4848be3828b92afc4d4a4eefaa412c984e57032d /hash.js | |
parent | ebd7c4d3b9a35e45c998d5360fac7ccfc8d8c2b0 (diff) | |
download | vimperator-plugins-736914648db0555c3d3db7eba751769ebc97b369.tar.bz2 |
* 語句を修正しました。
* ほか。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@28623 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'hash.js')
-rw-r--r-- | hash.js | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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; |