/* * ==VimperatorPlugin== * @name nicontroller.js * @description this script give you keyboard opration for nicovideo.jp. * @description-ja ニコニコ動画のプレーヤーをキーボードで操作できるようにする。 * @author janus_wel * @version 0.56 * @minversion 2.0pre 2008/10/16 * ==/VimperatorPlugin== * * LICENSE * New BSD License * * USAGE * :nicoinfo * プレーヤーに関しての情報を表示する。今のところバージョンだけ。 * :nicopause * 再生 / 一時停止を切り替える。 * :nicomute * 音声あり / なしを切り替える。 * :nicommentvisible * コメント表示 / 非表示を切り替える。 * :nicorepeat * リピート再生するかどうかを切り替える。 * :nicosize * 最大化 / ノーマルを切り替える。 * :nicoseek [position] * 指定した場所にシークする。秒数で指定が可能。 * 指定なしの場合一番最初にシークする。 * 負数の場合終わりからの秒数指定となる。 * :nicoseek! delta * 現在の位置から delta 分離れた所にシークする。秒数で指定が可能。 * マイナスを指定すると戻る。指定なしの場合変化しない。 * :nicovolume [volume] * ボリュームを設定する。 0 ~ 100 が指定できる。 * 指定なしの場合 100 にセットする。 * :nicovolume! delta * ボリュームを現在の値から変更する。 -100 ~ +100 を指定可能。 * 指定なしの場合変化しない。 * :nicodescription * 説明文・メニューの表示 / 非表示を切り替える * :nicomment comment * コメント欄を指定した文字列で埋める。 * 詳しい機能は http://d.hatena.ne.jp/janus_wel/20080913/1221317583 * :nicommand command * コマンド欄を指定した文字列で埋める。 * プレミアムかどうかで補完可能なコマンドも変化。 * 補完はけっこう賢くなったと思う。 * * HISTORY * 2008/07/13 ver. 0.10 - initial written. * 2008/07/14 ver. 0.20 - add nicosize, nicoseek, nicovolume. * 2008/07/15 ver. 0.30 - add nicoinfo. * 2008/07/19 ver. 0.31 - allow assign mm:ss format to seekTo method. * thanks to id:nokturnalmortum * refer: http://d.hatena.ne.jp/nokturnalmortum/20080718#1216314934 * - fix error message. * 2008/09/12 ver. 0.40 - completer function of :nicommand -> usefull. * - add feature: comment input assistance. * 2008/09/14 ver. 0.41 - fix the bug that happen by adding method to Array. * - fix the nicopause bug associated with * flvplayer's status('buffering' and 'end'). * thanks to なまえ (no name ?) * refer: http://d.hatena.ne.jp/janus_wel/20080914/1221387317 * 2008/10/01 ver. 0.50 - add :nicodescription. * 2008/10/02 ver. 0.51 - refactoring. * - 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 * "bang" in extra object on addUserCommand. * */ /* _vimperatorrc に以下のスクリプトを貼り付けると幸せになれるかも コマンド ( [',n-'] や [',n+'] の部分 ) は適宜変えてね。 javascript <