aboutsummaryrefslogtreecommitdiffstats
path: root/forcefocuscontent.js
diff options
context:
space:
mode:
authorhogelog2009-02-01 15:45:23 +0000
committerhogelog2009-02-01 15:45:23 +0000
commit997a02c0ea26c1e11d5302252e3a200f13ca2418 (patch)
tree071e89e30b575a7d90f9371c53cef1f7ec4b7e64 /forcefocuscontent.js
parent9bcf030092b478d5b047060b2009453369ae4e4f (diff)
downloadvimperator-plugins-997a02c0ea26c1e11d5302252e3a200f13ca2418.tar.bz2
* fix: don't focuscontent when background tab loaded
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@29402 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'forcefocuscontent.js')
-rw-r--r--forcefocuscontent.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/forcefocuscontent.js b/forcefocuscontent.js
index 73a437d..e8a5d3e 100644
--- a/forcefocuscontent.js
+++ b/forcefocuscontent.js
@@ -4,7 +4,7 @@ var PLUGIN_INFO =
<name>{NAME}</name>
<description>force focuscontent</description>
<author mail="konbu.komuro@gmail.com" homepage="http://d.hatena.ne.jp/hogelog/">hogelog</author>
- <version>0.1.0</version>
+ <version>0.1.1</version>
<minVersion>2.0pre</minVersion>
<maxVersion>2.0pre</maxVersion>
<updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/forcefocuscontent.js</updateURL>
@@ -14,6 +14,9 @@ var PLUGIN_INFO =
getBrowser().addEventListener("load", onPageLoad, true);
function onPageLoad(event)
{
+ let doc = event.originalTarget;
+ if (doc != getBrowser().contentDocument)
+ return;
setTimeout(function () {
let focused = document.commandDispatcher.focusedElement;
if (focused)