Reduce use of eval()
This commit is contained in:
parent
1f76455f19
commit
8a3d0dc389
@ -164,15 +164,14 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
|
|||||||
|
|
||||||
if ('TabmixContext' in window &&
|
if ('TabmixContext' in window &&
|
||||||
typeof TabmixContext.openMultipleLinks == 'function') {
|
typeof TabmixContext.openMultipleLinks == 'function') {
|
||||||
eval('TabmixContext.openMultipleLinks = '+
|
TabmixContext.__treestyletab__openMultipleLinks = TabmixContext.openMultipleLinks;
|
||||||
TabmixContext.openMultipleLinks.toSource().replace(
|
TabmixContext.openMultipleLinks = function(aCheck, ...aArgs) {
|
||||||
/(TMP_loadTabs\([^\)]+\);)/g,
|
if (!aCheck)
|
||||||
'TreeStyleTabService.readyToOpenChildTab(gBrowser, true); $1 TreeStyleTabService.stopToOpenChildTab(gBrowser);'
|
TreeStyleTabService.readyToOpenChildTabNow(gBrowser, true);
|
||||||
)
|
return this.__treestyletab__openMultipleLinks(aCheck, ...aArgs);
|
||||||
);
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let listener = {
|
let listener = {
|
||||||
handleEvent : function(aEvent)
|
handleEvent : function(aEvent)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user