aboutsummaryrefslogtreecommitdiffstats
path: root/prevent_focus_ietab.js
blob: fae6aa196e3e0db8fcff3107e8d6101ffb279564 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*

prevent_focus_ietab.js

Prevent focusing IE Tab when select a tab that renderd in IE Tab plugin.
IE Tab �ɏ����Ƀt�H�[�J�X���D�����đ����s�\�ɂȂ��̂��h��

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));
}

})();