diff options
author | anekos | 2010-03-31 11:44:16 +0000 |
---|---|---|
committer | anekos | 2010-03-31 11:44:16 +0000 |
commit | 6121c0857232e1b9ede232102d3264c987338ec9 (patch) | |
tree | 33f69d5b42d94a6a7ac0de7c6b6da980c9028ef9 | |
parent | bfc2de9a88c4c5cdbdf9322ef2e75d949af71bb3 (diff) | |
download | vimperator-plugins-6121c0857232e1b9ede232102d3264c987338ec9.tar.bz2 |
n% timecode を相対指定にも利用できる様に
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37131 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r-- | stella.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -39,7 +39,7 @@ let PLUGIN_INFO = <name lang="ja">すてら</name> <description>For Niconico/YouTube/Vimeo, Add control commands and information display(on status line).</description> <description lang="ja">ニコニコ動画/YouTube/Vimeo 用。操作コマンドと情報表示(ステータスライン上に)追加します。</description> - <version>0.26.0</version> + <version>0.26.1</version> <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> <license>new BSD License (Please read the source code comments of this plugin)</license> <license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license> @@ -380,7 +380,7 @@ Thanks: // 上手い具合に秒数に直すよ fromTimeCode: function (code, max) { var m; - if (max && (m = /^(\d+(?:\.\d)?)%/(code))) + if (max && (m = /^(-?\d+(?:\.\d)?)%/(code))) return Math.round(max * (parseFloat(m[1]) / 100)); if (m = /^(([-+]?)\d+):(\d+)$/(code)) return parseInt(m[1], 10) * 60 + (m[2] == '-' ? -1 : 1) * parseInt(m[3], 10); @@ -692,7 +692,7 @@ Thanks: }, seekRelative: function (v) - this.currentTime = Math.min(Math.max(this.currentTime + U.fromTimeCode(v), 0), this.totalTime), + this.currentTime = Math.min(Math.max(this.currentTime + U.fromTimeCode(v, this.totalTime), 0), this.totalTime), toggle: function (name) { if (!this.has(name, 'rwt')) |