From 670a7798725715aa66a7978cc1e88b6881cbabce Mon Sep 17 00:00:00 2001
From: anekos
Date: Wed, 4 Feb 2009 12:38:07 +0000
Subject: クリックによるシークのバグ修正 ホイールで音量を変更できるようにした
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@29534 d0d07461-0603-4401-acd4-de1884942a52
---
stella.js | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/stella.js b/stella.js
index 91cd4b2..a52b5f3 100644
--- a/stella.js
+++ b/stella.js
@@ -39,13 +39,13 @@ let PLUGIN_INFO =
すてら
Show video informations on the status line.
ステータスラインに動画の再生時間などを表示する。
- 0.17.1
+ 0.19.0
anekos
new BSD License (Please read the source code comments of this plugin)
修正BSDライセンス (ソースコードのコメントを参照してください)
2.0pre
2.0pre
- {'http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/' + __context__.PATH.match(/[^\\\/]+\.js$/)}
+ http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/stella.js
isValid ってなまえはどうなの?
-> isReady とか
・パネルなどの要素にクラス名をつける
+ ・上書き保存
FIXME
・this.last.fullscreen = value;
@@ -1440,6 +1441,8 @@ Thanks:
stbar.insertBefore(panel, document.getElementById('liberator-statusline').nextSibling);
let relmenu = document.getElementById('anekos-stela-relations-menupopup');
+
+ panel.addEventListener('DOMMouseScroll', U.bindr(this, this.onMouseScroll), true);
},
disable: function () {
@@ -1529,7 +1532,14 @@ Thanks:
let rect = event.target.getBoundingClientRect();
let x = event.screenX;
let per = (x - rect.left) / (rect.right - rect.left);
- this.player.currentTime = this.player.totalTime * per;
+ this.player.currentTime = parseInt(this.player.totalTime * per);
+ },
+
+ onMouseScroll: function (event) {
+ if (this.isValid && this.player.ready && event.detail) {
+ this.player.volume += (event.detail > 0) ? -5 : 5;
+ this.update();
+ }
},
onMutedClick: function (event) this.player.toggle('muted'),
--
cgit v1.2.3