Reduce use of eval()

This commit is contained in:
YUKI Hiroshi 2016-09-05 16:03:48 +09:00
parent 7dcde7d3e0
commit e3726d393d

View File

@ -418,13 +418,13 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
// SBM Counter // SBM Counter
// http://miniturbo.org/products/sbmcounter/ // http://miniturbo.org/products/sbmcounter/
if ('SBMCounter' in window && if ('SBMCounter' in window &&
TreeStyleTabUtils.getTreePref('compatibility.SBMCounter')) { TreeStyleTabUtils.getTreePref('compatibility.SBMCounter') &&
eval('SBMCounter.action = '+ !SBMCounter.__treestyletab__action) {
SBMCounter.action.toSource().replace( SBMCounter.__treestyletab__action = SBMCounter.action;
'gBrowser.selectedTab = gBrowser.addTab', SBMCounter.action = function(...aArgs) {
'TreeStyleTabService.readyToOpenChildTab(gBrowser); $&' TreeStyleTabService.readyToOpenChildTabNow(gBrowser);
) return this.__treestyletab__action(...aArgs);
); };
} }
// Snap Links Plus // Snap Links Plus