From dc88d587c061735c93a2e8be88a2ac8da53f5be6 Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 3 Feb 2010 11:57:29 +0000 Subject: スクロール位置を戻すコードの修正 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36605 d0d07461-0603-4401-acd4-de1884942a52 --- stella.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'stella.js') diff --git a/stella.js b/stella.js index 09ee63a..fb160a5 100644 --- a/stella.js +++ b/stella.js @@ -39,7 +39,7 @@ let PLUGIN_INFO = すてら For Niconico/YouTube/Vimeo, Add control commands and information display(on status line). ニコニコ動画/YouTube/Vimeo 用。操作コマンドと情報表示(ステータスライン上に)追加します。 - 0.21.0 + 0.22.1 anekos new BSD License (Please read the source code comments of this plugin) 修正BSDライセンス (ソースコードのコメントを参照してください) @@ -962,9 +962,13 @@ Thanks: let win = Buffer.findScrollableWindow(); this.storage.scrollPositionBeforeLarge = {x: win.scrollX, y: win.scrollY}; } + this.player.ext_setVideoSize(value ? NicoPlayer.SIZE_LARGE : NicoPlayer.SIZE_NORMAL); - let (pos = this.storage.scrollPositionBeforeLarge) - (value || typeof pos == "undefined" || buffer.scrollTo(pos.x, pos.y)); + + let pos = this.storage.scrollPositionBeforeLarge; + if (!value && typeof pos != "undefined") + setTimeout(function () buffer.scrollTo(pos.x, pos.y), 0); + return this.large; }, -- cgit v1.2.3