Handle new tabs from the "new tab" button correctly on Firefox 11 and later

This commit is contained in:
SHIMODA Hiroshi 2012-05-02 20:41:49 +09:00
parent 3a38833c23
commit a17733656e

View File

@ -36,8 +36,10 @@ var TreeStyleTabWindowHelper = {
if ('BrowserOpenTab' in window) {
eval('window.BrowserOpenTab = '+
window.BrowserOpenTab.toSource().replace(
'gBrowser.loadOneTab(',
'gBrowser.treeStyleTab.onBeforeNewTabCommand(); $&'
// loadOneTab => Firefox 10 or olders
// openUILinkIn => Firefox 11 or later
/(gBrowser\.loadOneTab\(|openUILinkIn\(.+\,\s*"tab"\))/,
'gBrowser.treeStyleTab.onBeforeNewTabCommand(); $1'
)
);
}