From 6121c0857232e1b9ede232102d3264c987338ec9 Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 31 Mar 2010 11:44:16 +0000 Subject: n% timecode を相対指定にも利用できる様に git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37131 d0d07461-0603-4401-acd4-de1884942a52 --- stella.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stella.js b/stella.js index b78faef..fc43747 100644 --- a/stella.js +++ b/stella.js @@ -39,7 +39,7 @@ let PLUGIN_INFO = すてら For Niconico/YouTube/Vimeo, Add control commands and information display(on status line). ニコニコ動画/YouTube/Vimeo 用。操作コマンドと情報表示(ステータスライン上に)追加します。 - 0.26.0 + 0.26.1 anekos new BSD License (Please read the source code comments of this plugin) 修正BSDライセンス (ソースコードのコメントを参照してください) @@ -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')) -- cgit v1.2.3