aboutsummaryrefslogtreecommitdiffstats
path: root/nicontroller.js
diff options
context:
space:
mode:
authoranekos2008-11-18 16:05:01 +0000
committeranekos2008-11-18 16:05:01 +0000
commitfe3b73d1e345b13239e7a07fa7593b720feca3d6 (patch)
tree703d338e6d561445c770fa70ffd26c5a9ea8a884 /nicontroller.js
parent95f01b5b6ad36c3887306d63c9b9b4a1652ef541 (diff)
downloadvimperator-plugins-fe3b73d1e345b13239e7a07fa7593b720feca3d6.tar.bz2
停止中かつ終端のときに再生すると、初めに戻ってから再生するようにした。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@24182 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'nicontroller.js')
-rw-r--r--nicontroller.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/nicontroller.js b/nicontroller.js
index 6e35cf6..e618bb5 100644
--- a/nicontroller.js
+++ b/nicontroller.js
@@ -285,9 +285,12 @@ NicoPlayerController.prototype = {
let base = p.ext_getPlayheadTime();
let self = this;
setTimeout(function () {
- base !== p.ext_getPlayheadTime()
- ? p.ext_play(self.constants.PAUSE)
- : p.ext_play(self.constants.PLAY);
+ if (base !== p.ext_getPlayheadTime()) {
+ p.ext_play(self.constants.PAUSE);
+ } else {
+ p.ext_setPlayheadTime(0);
+ p.ext_play(self.constants.PLAY);
+ }
}, 100);
}
},