diff options
Diffstat (limited to 'prevent_focus_ietab.js')
-rw-r--r-- | prevent_focus_ietab.js | 23 |
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));
+}
+
+})();
|