Handle new tabs from the "new tab" button correctly on Firefox 11 and later
This commit is contained in:
parent
3a38833c23
commit
a17733656e
@ -36,8 +36,10 @@ var TreeStyleTabWindowHelper = {
|
|||||||
if ('BrowserOpenTab' in window) {
|
if ('BrowserOpenTab' in window) {
|
||||||
eval('window.BrowserOpenTab = '+
|
eval('window.BrowserOpenTab = '+
|
||||||
window.BrowserOpenTab.toSource().replace(
|
window.BrowserOpenTab.toSource().replace(
|
||||||
'gBrowser.loadOneTab(',
|
// loadOneTab => Firefox 10 or olders
|
||||||
'gBrowser.treeStyleTab.onBeforeNewTabCommand(); $&'
|
// openUILinkIn => Firefox 11 or later
|
||||||
|
/(gBrowser\.loadOneTab\(|openUILinkIn\(.+\,\s*"tab"\))/,
|
||||||
|
'gBrowser.treeStyleTab.onBeforeNewTabCommand(); $1'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user