From fe3b73d1e345b13239e7a07fa7593b720feca3d6 Mon Sep 17 00:00:00 2001 From: anekos Date: Tue, 18 Nov 2008 16:05:01 +0000 Subject: 停止中かつ終端のときに再生すると、初めに戻ってから再生するようにした。 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@24182 d0d07461-0603-4401-acd4-de1884942a52 --- nicontroller.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'nicontroller.js') 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); } }, -- cgit v1.2.3