From b97e6418dc1ad29ec6894331a0dae118786d6786 Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 1 Apr 2009 10:52:29 +0000 Subject: ooops git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@31787 d0d07461-0603-4401-acd4-de1884942a52 --- auto-focus-frame.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'auto-focus-frame.js') diff --git a/auto-focus-frame.js b/auto-focus-frame.js index 2149d3e..936dedd 100644 --- a/auto-focus-frame.js +++ b/auto-focus-frame.js @@ -38,7 +38,7 @@ let PLUGIN_INFO = Auto focus frame Automatically focus to largest frame. 最も大きなフレームに自動的にフォーカスする。 - 1.0.3 + 1.0.4 anekos new BSD License (Please read the source code comments of this plugin) 修正BSDライセンス (ソースコードのコメントを参照してください) @@ -66,7 +66,7 @@ let PLUGIN_INFO = return; if (content.frames.length <= 1) return; - let [maxSize, maxFrame] = [-1, content.frames[0]]; + let [maxSize, maxFrame] = [-1, null]; for (let frame in util.Array.iterator(content.frames)) { try { if (!(frame.frameElement instanceof HTMLFrameElement)) @@ -83,7 +83,8 @@ let PLUGIN_INFO = continue; } } - maxFrame.focus(); + if (maxFrame) + maxFrame.focus(); } ); -- cgit v1.2.3