Reduce use of eval()

This commit is contained in:
YUKI Hiroshi 2016-09-06 15:38:31 +09:00
parent 1f76455f19
commit 8a3d0dc389

View File

@ -164,15 +164,14 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
if ('TabmixContext' in window &&
typeof TabmixContext.openMultipleLinks == 'function') {
eval('TabmixContext.openMultipleLinks = '+
TabmixContext.openMultipleLinks.toSource().replace(
/(TMP_loadTabs\([^\)]+\);)/g,
'TreeStyleTabService.readyToOpenChildTab(gBrowser, true); $1 TreeStyleTabService.stopToOpenChildTab(gBrowser);'
)
);
TabmixContext.__treestyletab__openMultipleLinks = TabmixContext.openMultipleLinks;
TabmixContext.openMultipleLinks = function(aCheck, ...aArgs) {
if (!aCheck)
TreeStyleTabService.readyToOpenChildTabNow(gBrowser, true);
return this.__treestyletab__openMultipleLinks(aCheck, ...aArgs);
};
}
let listener = {
handleEvent : function(aEvent)
{