Changeset 20940

Show
Ignore:
Timestamp:
10/08/08 03:03:17 (3 months ago)
Author:
drry
Message:
  • fixed typos, "controll".
  • et cetera.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/vimperator-plugins/trunk/youtubeamp.js

    r20937 r20940  
    22 * ==VimperatorPlugin== 
    33 * @name            youtubeamp.js 
    4  * @description     this script give you keyboard opration for youtube.com. 
     4 * @description     this script gives you keyboard oprations for YouTube.com. 
    55 * @description-ja  YouTube のプレーヤーをキーボードで操作できるようにする。 
    66 * @author          janus_wel <janus_wel@fb3.so-net.ne.jp> 
    7  * @version         0.10 
     7 * @version         0.11 
    88 * @minversion      1.2 
    99 * ==VimperatorPlugin== 
     
    4141 * */ 
    4242 
    43 (function(){ 
     43(function() { 
    4444 
    4545Function.prototype.bind = function(object) { 
     
    4747    return function() { 
    4848        return __method.apply(object, arguments); 
    49     } 
     49    }; 
    5050}; 
    5151 
     
    5656} 
    5757YouTubePlayerController.prototype = { 
    58     initialize: function () { 
     58    initialize: function() { 
    5959        this.fuller = this._changeToFull.bind(this); 
    6060    }, 
    6161 
    6262    constants: { 
    63         VERSION:        '0.10', 
    64  
    65         CARDINAL_NUMBER:    10, 
    66  
    67         YOUTUBE_DOMAIN:    '.youtube.jp', 
    68         YOUTUBE_URL:       '^http://[^.]+\\.youtube\\.com/', 
    69         WATCH_URL:          'http://[^.]+\\.youtube\\.com/watch', 
    70         WATCH_PAGE:         1, 
     63        VERSION: '0.10', 
     64 
     65        CARDINAL_NUMBER: 10, 
     66 
     67        YOUTUBE_DOMAIN: '.youtube.jp', 
     68        YOUTUBE_URL:    '^http://[^.]+\\.youtube\\.com/', 
     69        WATCH_URL:      'http://[^.]+\\.youtube\\.com/watch', 
     70        WATCH_PAGE:     1, 
    7171 
    7272        PLAYER_NODE_ID: 'movie_player', 
    7373 
    74         STATE_PLAYING:  1, 
    75  
    76         SIZE_WIDTH_DEFAULT:     480, 
    77         SIZE_HEIGHT_DEFAULT:    385, 
     74        STATE_PLAYING: 1, 
     75 
     76        SIZE_WIDTH_DEFAULT:  480, 
     77        SIZE_HEIGHT_DEFAULT: 385, 
    7878 
    7979        NAME_PLAYER_VERSION: 'PLAYER_VERSION', 
    8080 
    81         SEEKTO_DEFAULT:     0, 
    82         SEEKBY_DEFAULT:     0, 
    83         VOLUMETO_DEFAULT:   100, 
    84         VOLUMEBY_DEFAULT:   0, 
     81        SEEKTO_DEFAULT:   0, 
     82        SEEKBY_DEFAULT:   0, 
     83        VOLUMETO_DEFAULT: 100, 
     84        VOLUMEBY_DEFAULT: 0, 
    8585 
    8686        HIDE_NODES: [ 
     
    9696    }, 
    9797 
    98     getControllerVersion: function () { return this.constants.VERSION; }, 
     98    getControllerVersion: function() { return this.constants.VERSION; }, 
    9999 
    100100    pagecheck: function() { 
     
    134134    }, 
    135135 
    136     _changeToFull: function () { 
    137         var p = this._player(); 
    138         setTimeout(function () { 
     136    _changeToFull: function() { 
     137        var p = this._player(); 
     138        setTimeout(function() { 
    139139            p.width = content.innerWidth; 
    140140            p.height = content.innerHeight; 
     
    142142    }, 
    143143 
    144     _getElementById: function (id) { 
     144    _getElementById: function(id) { 
    145145        var e = window.content.document.getElementById(id); 
    146         if (!e) return null; 
     146        if(!e) return null; 
    147147 
    148148        return e.wrappedJSObject 
     
    151151    }, 
    152152 
    153     _fullSize: function () { 
     153    _fullSize: function() { 
    154154        var b = this._getElementById('baseDiv'); 
    155155        this.defMargin = b.style.margin; 
     
    160160        b.style.width = '100%'; 
    161161 
    162         for (var i=0, max=this.constants.HIDE_NODES.length ; i<max ; ++i) { 
     162        for(var i=0, max=this.constants.HIDE_NODES.length ; i<max ; ++i) { 
    163163            var h = this._getElementById(this.constants.HIDE_NODES[i]); 
    164             if (h) { h.style.display = 'none'; } 
     164            if(h) { h.style.display = 'none'; } 
    165165        } 
    166166 
     
    174174    }, 
    175175 
    176     _normalSize: function () { 
     176    _normalSize: function() { 
    177177        var b = this._getElementById('baseDiv'); 
    178178        b.style.margin  = this.defMargin; 
     
    180180        b.style.width   = this.defWidth; 
    181181 
    182         for (var i=0, max=this.constants.HIDE_NODES.length ; i<max ; ++i) { 
     182        for(var i=0, max=this.constants.HIDE_NODES.length ; i<max ; ++i) { 
    183183            var h = this._getElementById(this.constants.HIDE_NODES[i]); 
    184             if (h) { h.style.display = 'block'; } 
     184            if(h) { h.style.display = 'block'; } 
    185185        } 
    186186 
     
    258258            var info = [ 
    259259                'controller version : ' + controller.getControllerVersion(), 
    260             ].join("\n"); 
     260            ].join('\n'); 
    261261            liberator.echo(info, liberator.commandline.FORCE_MULTILINE); 
    262262        } 
     
    288288liberator.commands.addUserCommand( 
    289289    ['ytseek'], 
    290     'controll seek bar', 
     290    'control seek bar', 
    291291    function(arg, special) { 
    292292        try      { special ? controller.seekBy(arg) : controller.seekTo(arg); } 
     
    294294    }, 
    295295    { 
    296         bang:   true, 
     296        bang: true, 
    297297    } 
    298298); 
     
    300300liberator.commands.addUserCommand( 
    301301    ['ytvolume'], 
    302     'controll volume', 
     302    'control volume', 
    303303    function(arg, special) { 
    304304        try      { special ? controller.volumeBy(arg) : controller.volumeTo(arg); } 
     
    306306    }, 
    307307    { 
    308         bang:   true, 
     308        bang: true, 
    309309    } 
    310310);