diff options
author | anekos | 2009-04-01 10:52:29 +0000 |
---|---|---|
committer | anekos | 2009-04-01 10:52:29 +0000 |
commit | b97e6418dc1ad29ec6894331a0dae118786d6786 (patch) | |
tree | 0a12ad130abacc325c517ca63e407470d37b94d7 /auto-focus-frame.js | |
parent | eedd004685255630439ca934cc6e0a04e62674d7 (diff) | |
download | vimperator-plugins-b97e6418dc1ad29ec6894331a0dae118786d6786.tar.bz2 |
ooops
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@31787 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'auto-focus-frame.js')
-rw-r--r-- | auto-focus-frame.js | 7 |
1 files changed, 4 insertions, 3 deletions
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 = <name>Auto focus frame</name> <description>Automatically focus to largest frame.</description> <description lang="ja">最も大きなフレームに自動的にフォーカスする。</description> - <version>1.0.3</version> + <version>1.0.4</version> <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> <license>new BSD License (Please read the source code comments of this plugin)</license> <license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license> @@ -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(); } ); |