From 723dc2b391970a21278362607ebdbaa89cdc3faf Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 4 Feb 2009 12:03:59 +0000 Subject: タブを切り替えたときにも自動フルスクリーンしてしまうバグを修正 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@29532 d0d07461-0603-4401-acd4-de1884942a52 --- stella.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'stella.js') diff --git a/stella.js b/stella.js index 41e8f49..91cd4b2 100644 --- a/stella.js +++ b/stella.js @@ -39,7 +39,7 @@ let PLUGIN_INFO = すてら Show video informations on the status line. ステータスラインに動画の再生時間などを表示する。 - 0.17.0 + 0.17.1 anekos new BSD License (Please read the source code comments of this plugin) 修正BSDライセンス (ソースコードのコメントを参照してください) @@ -476,7 +476,7 @@ Thanks: get statusText () this.timeCodes, get storage () - (content.document.__stella_storage || (content.document.__stella_storage = {})), + (content.document.__stella_player_storage || (content.document.__stella_player_storage = {})), get timeCodes () (U.toTimeCode(this.currentTime) + '/' + U.toTimeCode(this.totalTime)), @@ -841,6 +841,8 @@ Thanks: get fullscreen () !!this.storage.fullscreen, set fullscreen (value) { + let self = this; + function setVariables (fullscreen) { NicoPlayer.Variables.forEach(function ([name, normal, full]) { let v = fullscreen ? full : normal; @@ -918,8 +920,7 @@ Thanks: this.storage.fullscreen = value; - let self = this, player = this.player, - win = content.wrappedJSObject, doc = content.document.wrappedJSObject; + let player = this.player, win = content.wrappedJSObject, doc = content.document.wrappedJSObject; if (player.ext_getVideoSize() === 'fit') player.ext_setVideoSize('normal'); @@ -1299,6 +1300,9 @@ Thanks: get statusBarVisible () !this.statusBar.getAttribute('moz-collapsed', false), set statusBarVisible (value) (this.statusBar.setAttribute('moz-collapsed', !value), value), + get storage () + (content.document.__stella_storage || (content.document.__stella_storage = {})), + get where () { for (let [name, player] in Iterator(this.players)) if (player.isValid) @@ -1535,7 +1539,8 @@ Thanks: onPlayClick: function () this.player.play(), onReady: function () { - if (this.player.last.fullscreen && !this.__autoFullscreenTimer) { + if (this.player.last.fullscreen && !this.storage.alreadyAutoFullscreen + && !this.__autoFullscreenTimer) { this.__autoFullscreenTimer = setInterval( U.bindr(this, function () { if (!this.player.ready) @@ -1547,6 +1552,7 @@ Thanks: 200 ); } + this.storage.alreadyAutoFullscreen = true; }, onRepeatClick: function () this.player.toggle('repeating'), -- cgit v1.2.3