Reduce use of eval()
This commit is contained in:
parent
96716bd5cf
commit
488116670b
@ -602,13 +602,13 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
|
|||||||
// https://addons.mozilla.org/firefox/addon/context-search/
|
// https://addons.mozilla.org/firefox/addon/context-search/
|
||||||
if ('contextsearch' in window &&
|
if ('contextsearch' in window &&
|
||||||
'search' in window.contextsearch &&
|
'search' in window.contextsearch &&
|
||||||
TreeStyleTabUtils.getTreePref('compatibility.ContextSearch')) {
|
TreeStyleTabUtils.getTreePref('compatibility.ContextSearch') &&
|
||||||
eval('contextsearch.search = '+
|
!contextsearch.__treestyletab__search) {
|
||||||
contextsearch.search.toSource().replace(
|
contextsearch.__treestyletab__search = contextsearch.search;
|
||||||
'var newTab = ',
|
contextsearch.search = function(...aArgs) {
|
||||||
'TreeStyleTabService.readyToOpenChildTab(); $&'
|
TreeStyleTabService.readyToOpenChildTabNow();
|
||||||
)
|
return this.__treestyletab__search(...aArgs);
|
||||||
);
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tile Tabs
|
// Tile Tabs
|
||||||
|
Loading…
Reference in New Issue
Block a user