From 9fda761a19d85de1b79a109f91cc7080f32d207c Mon Sep 17 00:00:00 2001 From: drry Date: Sat, 1 Nov 2008 22:35:24 +0000 Subject: * メタデータブロックを閉じました。 * ほか。 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@22555 d0d07461-0603-4401-acd4-de1884942a52 --- nicontroller.js | 64 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'nicontroller.js') diff --git a/nicontroller.js b/nicontroller.js index c1ed0ad..6e35cf6 100644 --- a/nicontroller.js +++ b/nicontroller.js @@ -6,7 +6,7 @@ * @author janus_wel * @version 0.54 * @minversion 2.0pre 2008/10/16 - * ==VimperatorPlugin== + * ==/VimperatorPlugin== * * LICENSE * New BSD License @@ -66,7 +66,7 @@ * - use Error object when throw exception. * - extract constant variables from code * and define in NicoPlayerController.constants. - * 2008/10/08 ver. 0.52 - correspond vimperator specification + * 2008/10/08 ver. 0.52 - correspond Vimperator specification * "bang" in extra object on addUserCommand. * */ @@ -105,7 +105,7 @@ liberator.modules.mappings.addUserMap( EOM */ -(function(){ +(function() { // class definition // cookie manager @@ -123,7 +123,7 @@ CookieManager.prototype = { this.ioService = Cc[IO_SERVICE].getService(Ci.nsIIOService); this.cookieService = Cc[COOKIE_SERVICE].getService(Ci.nsICookieService); - if (!this.ioService || !this.cookieService) { + if(!this.ioService || !this.cookieService) { throw new Error('error on CookieManager initialize.'); } @@ -131,7 +131,7 @@ CookieManager.prototype = { }, readCookie: function (uri) { - if (uri) { + if(uri) { this.uri = uri; this.uriObject = this.ioService.newURI(uri, null, null); this.cookie = this._deserializeCookie(this._getCookieString()); @@ -145,7 +145,7 @@ CookieManager.prototype = { }, _setCookieString: function (cookieString) { - if (this.uriObject && cookieString) { + if(this.uriObject && cookieString) { this.cookieService.setCookieString(this.uriObject, null, cookieString, null); } }, @@ -154,7 +154,7 @@ CookieManager.prototype = { var cookies = cookieString.split('; '); var cookie = {}; var key, val; - for (var i=0, max=cookies.length ; i 1) + let arg = (args.arguments.length > 1) ? args.arguments[0].toString() : args.string; special ? controller.seekBy(arg) : controller.seekTo(arg); @@ -500,7 +500,7 @@ liberator.modules.commands.addUserCommand( 'controll volume', function(args, special) { try { - var arg = (args.arguments.length > 1) + let arg = (args.arguments.length > 1) ? args.arguments[0].toString() : args.string; special ? controller.volumeBy(arg) : controller.volumeTo(arg); @@ -537,9 +537,9 @@ liberator.modules.commands.addUserCommand( 'fill comment box', function(args) { try { - var arg = args.string; + let arg = args.string; - var command, comment; + let command, comment; [command, comment] = expandExCommand(arg); comment = comment.replace(/ /g, EMSP) @@ -564,7 +564,7 @@ liberator.modules.commands.addUserCommand( catch(e) { liberator.echoerr(e); } }, { - completer: function(args){ + completer: function(args) { var arg = args.string; // get available commands by roll @@ -582,8 +582,8 @@ liberator.modules.commands.addUserCommand( // exclude inputted word from candidates var candidates = availableCommands.filter( function(commandSet) { - for(var i=0, numofInputted=inputted.length ; i properties.max) line = properties.max; properties.line = line; -- cgit v1.2.3