Reduce use of eval()
This commit is contained in:
parent
62cda54a6f
commit
c101e5376d
@ -291,16 +291,17 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
|
|||||||
|
|
||||||
// DragIt
|
// DragIt
|
||||||
// https://addons.mozilla.org/firefox/addon/dragit-formerly-drag-de-go/
|
// https://addons.mozilla.org/firefox/addon/dragit-formerly-drag-de-go/
|
||||||
|
// open new tabs as children of the current tab, for links or search terms
|
||||||
if ('DragIt' in window &&
|
if ('DragIt' in window &&
|
||||||
DragIt.tab &&
|
DragIt.tab &&
|
||||||
DragIt.tab.open &&
|
DragIt.tab.open &&
|
||||||
TreeStyleTabUtils.getTreePref('compatibility.DragIt')) {
|
TreeStyleTabUtils.getTreePref('compatibility.DragIt') &&
|
||||||
eval('DragIt.tab.open = '+
|
!DragIt.tab.__treestyletab__open) {
|
||||||
DragIt.tab.open.toSource().replace(
|
DragIt.tab.__treestyletab__open = DragIt.tab.open;
|
||||||
'try {',
|
DragIt.tab.open = function(...aArgs) {
|
||||||
'try { TreeStyleTabService.readyToOpenChildTabNow(gBrowser);'
|
TreeStyleTabService.readyToOpenChildTabNow(gBrowser);
|
||||||
)
|
return this.__treestyletab__open(...aArgs);
|
||||||
);
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Colorful Tabs
|
// Colorful Tabs
|
||||||
|
Loading…
Reference in New Issue
Block a user