From f7bf8efa819e015efcaac3b7c33378394f23ea06 Mon Sep 17 00:00:00 2001 From: anekos Date: Thu, 18 Dec 2008 17:59:54 +0000 Subject: フルスクリーン時にウインドウのリサイズが起こると馬虞屡の修正 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@27042 d0d07461-0603-4401-acd4-de1884942a52 --- stella.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'stella.js') diff --git a/stella.js b/stella.js index 7457950..127ae01 100644 --- a/stella.js +++ b/stella.js @@ -39,7 +39,7 @@ let PLUGIN_INFO = すてら Show video informations on the status line. ステータスラインに動画の再生時間などを表示する。 - 0.11 + 0.13 anekos new BSD License (Please read the source code comments of this plugin) 修正BSDライセンス (ソースコードのコメントを参照してください) @@ -785,7 +785,13 @@ Thanks: // toggleMaximizePlayer でサイズが変わってしまうのであらかじめ保存しておく… let oldHeight = content.getComputedStyle(player, '').height; win.toggleMaximizePlayer(); + turnOnMain(); + // 保存したもので修正する for toggleMaximizePlayer問題 + player.style.__stella_backup.height = oldHeight; + win.onresize = fixFullscreen; + } + function turnOnMain () { let viewer = {w: 544, h: 384}; let screen = { w: content.innerWidth, @@ -816,14 +822,10 @@ Thanks: marginTop: ((screen.h - viewer.h * scale.w) / 2) + 'px' } ); - // 保存したもので修正する for toggleMaximizePlayer問題 - player.style.__stella_backup.height = oldHeight; player.SetVariable('videowindow._xscale', 100 * scale.v); player.SetVariable('videowindow._yscale', 100 * scale.v); setVariables(true); - - win.onresize = fixFullscreen; } function turnOff () { @@ -837,7 +839,7 @@ Thanks: } function fixFullscreen () - ((InVimperator && liberator.mode === modes.COMMAND_LINE) || setTimeout(turnOn, 500)); + ((InVimperator && liberator.mode === modes.COMMAND_LINE) || setTimeout(turnOnMain, 500)); // メイン value = !!value; -- cgit v1.2.3