From 7ca56a80a25c2866ab189d4254e6f1948af45948 Mon Sep 17 00:00:00 2001 From: anekos Date: Sun, 13 Jun 2010 15:29:24 +0000 Subject: コメントをローカルに表示するように git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37836 d0d07461-0603-4401-acd4-de1884942a52 --- stella.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'stella.js') diff --git a/stella.js b/stella.js index f806de7..c774c80 100644 --- a/stella.js +++ b/stella.js @@ -1427,8 +1427,7 @@ Thanks: __proto__: info.flvInfo, ticket: info.ticket, postkey: info.postkey, - // 0 秒コメントはうざいらしいので勝手に自重する - vpos: Math.max(100, parseInt(vpos || (self.player.ext_getPlayheadTime() * 100), 10)), + vpos: vpos * 100, body: message }; U.log(args); @@ -1437,12 +1436,20 @@ Thanks: U.log(xhr.responseText); } + function sendDummyComment (message, command, position) { + self.player.ext_sendLocalMessage(message, command, vpos); + } + + // 0 秒コメントはうざいらしいので勝手に自重する + vpos = Math.max(1, parseInt(vpos || self.currentTime, 10)); + U.log('sendcommnet'); getThumbInfo(); getFLV(); getPostkey(); getComments(); sendChat(); + sendDummyComment(message, command, vpos); } }; @@ -1491,7 +1498,7 @@ Thanks: set muted (value) (this.volume = value ? 0 : 100), get player () - this.__initializePlayer(U.xpathGet('//embed[contains(@id,"vimeo_clip_")]').wrappedJSObject), + this.__initializePlayer(content.document.querySelector('.player > object').wrappedJSObject), get ready () !!this.player, -- cgit v1.2.3