Reduce use of eval()
This commit is contained in:
parent
7dcde7d3e0
commit
e3726d393d
@ -418,13 +418,13 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
|
||||
// SBM Counter
|
||||
// http://miniturbo.org/products/sbmcounter/
|
||||
if ('SBMCounter' in window &&
|
||||
TreeStyleTabUtils.getTreePref('compatibility.SBMCounter')) {
|
||||
eval('SBMCounter.action = '+
|
||||
SBMCounter.action.toSource().replace(
|
||||
'gBrowser.selectedTab = gBrowser.addTab',
|
||||
'TreeStyleTabService.readyToOpenChildTab(gBrowser); $&'
|
||||
)
|
||||
);
|
||||
TreeStyleTabUtils.getTreePref('compatibility.SBMCounter') &&
|
||||
!SBMCounter.__treestyletab__action) {
|
||||
SBMCounter.__treestyletab__action = SBMCounter.action;
|
||||
SBMCounter.action = function(...aArgs) {
|
||||
TreeStyleTabService.readyToOpenChildTabNow(gBrowser);
|
||||
return this.__treestyletab__action(...aArgs);
|
||||
};
|
||||
}
|
||||
|
||||
// Snap Links Plus
|
||||
|
Loading…
Reference in New Issue
Block a user