diff options
author | hogelog | 2009-02-01 15:35:17 +0000 |
---|---|---|
committer | hogelog | 2009-02-01 15:35:17 +0000 |
commit | 9bcf030092b478d5b047060b2009453369ae4e4f (patch) | |
tree | 3825c806f17bc433a0c94cbb29c023cf0aa12f68 /forcefocuscontent.js | |
parent | 6536b91042bc774c9dd044acc30dfd744883d7d3 (diff) | |
download | vimperator-plugins-9bcf030092b478d5b047060b2009453369ae4e4f.tar.bz2 |
add forcefocuscontent.js
* force focuscontent (nocheck focusedElement has value or not)
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@29400 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'forcefocuscontent.js')
-rw-r--r-- | forcefocuscontent.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/forcefocuscontent.js b/forcefocuscontent.js new file mode 100644 index 0000000..73a437d --- /dev/null +++ b/forcefocuscontent.js @@ -0,0 +1,23 @@ +// PLUGIN_INFO//{{{ +var PLUGIN_INFO = +<VimperatorPlugin> + <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> + <minVersion>2.0pre</minVersion> + <maxVersion>2.0pre</maxVersion> + <updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/forcefocuscontent.js</updateURL> +</VimperatorPlugin>; +//}}} + +getBrowser().addEventListener("load", onPageLoad, true); +function onPageLoad(event) +{ + setTimeout(function () { + let focused = document.commandDispatcher.focusedElement; + if (focused) + focused.blur(); + }, 100); +} +// vim: fdm=marker sw=4 ts=4 et: |