Patch to toggleSidebar only when possible.
The function will be removed in the future by changes introduced at https://bugzilla.mozilla.org/show_bug.cgi?id=1123517
This commit is contained in:
parent
54b2c981b1
commit
42c24c1628
@ -295,12 +295,14 @@ var TreeStyleTabWindowHelper = {
|
||||
}, 'treeStyleTab');
|
||||
}
|
||||
|
||||
TreeStyleTabUtils.doPatching(window.toggleSidebar, 'window.toggleSidebar', function(aName, aSource) {
|
||||
return eval(aName+' = '+aSource.replace(
|
||||
'{',
|
||||
'{ gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_TOGGLE_SIDEBAR);'
|
||||
));
|
||||
}, 'treeStyleTab');
|
||||
if ('toggleSidebar' in window) {
|
||||
TreeStyleTabUtils.doPatching(window.toggleSidebar, 'window.toggleSidebar', function(aName, aSource) {
|
||||
return eval(aName+' = '+aSource.replace(
|
||||
'{',
|
||||
'{ gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_TOGGLE_SIDEBAR);'
|
||||
));
|
||||
}, 'treeStyleTab');
|
||||
}
|
||||
},
|
||||
_splitFunctionNames : function TSTWH__splitFunctionNames(aString)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user