aboutsummaryrefslogtreecommitdiffstats
path: root/prevent_focus_ietab.js
diff options
context:
space:
mode:
authorsnaka2009-01-21 12:08:48 +0000
committersnaka2009-01-21 12:08:48 +0000
commit78ac6d2d907f50dda8595f61b9426655b0054442 (patch)
tree2203dcf316cbf73e2788448986fbd9adb93c04b2 /prevent_focus_ietab.js
parente03c4a1d2e35c037d7b56c0f78d9ef7752e69e07 (diff)
downloadvimperator-plugins-78ac6d2d907f50dda8595f61b9426655b0054442.tar.bz2
My first plugin
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@28759 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'prevent_focus_ietab.js')
-rw-r--r--prevent_focus_ietab.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/prevent_focus_ietab.js b/prevent_focus_ietab.js
new file mode 100644
index 0000000..fae6aa1
--- /dev/null
+++ b/prevent_focus_ietab.js
@@ -0,0 +1,23 @@
+/*
+
+prevent_focus_ietab.js
+
+Prevent focusing IE Tab when select a tab that renderd in IE Tab plugin.
+IE Tab に勝手にフォーカスを奪われて操作不能になるのを防ぐ
+
+Copyright (c) 2009, snaka<snaka.gml@gmail.com>.
+All rights reserved.
+This software distribute under term of new BSD style license.
+
+*/
+(function() {
+
+if (gIeTab && gIeTab.onTabSelected) {
+ liberator.log("replace IeTab.onTabSelected() function");
+ var func = gIeTab.onTabSelected.toSource();
+ var newFunc = func.replace(/window\.setTimeout\(gIeTab\.focusIeTab, 0\);/, '');
+ gIeTab.removeEventListener("appcontent", "select", gIeTab.onTabSelected);
+ gIeTab.addEventListener("appcontent", "select", new Function(newFunc));
+}
+
+})();