diff options
author | drry | 2009-01-22 19:32:06 +0000 |
---|---|---|
committer | drry | 2009-01-22 19:32:06 +0000 |
commit | dcca60ea0cd7939f3e9aa7657bd3ae30bf909608 (patch) | |
tree | 28dfd9a8076b11ca9a98dd880f86406a7ec4302c /prevent_focus_ietab.js | |
parent | 9cf3cdfadf889ef6d3007d5d287fa1f3926945e5 (diff) | |
download | vimperator-plugins-dcca60ea0cd7939f3e9aa7657bd3ae30bf909608.tar.bz2 |
* cosmetic changes.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@28871 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'prevent_focus_ietab.js')
-rw-r--r-- | prevent_focus_ietab.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/prevent_focus_ietab.js b/prevent_focus_ietab.js index fae6aa1..c4deb1f 100644 --- a/prevent_focus_ietab.js +++ b/prevent_focus_ietab.js @@ -12,12 +12,11 @@ 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));
-}
+if (!gIeTab || !gIeTab.onTabSelected) return;
+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));
})();
|