Reduce use of eval()
This commit is contained in:
parent
7b820848f8
commit
f9b1508e9c
@ -571,13 +571,13 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
|
||||
// https://addons.mozilla.org/firefox/addon/instaclick/
|
||||
if ('instaclick' in window &&
|
||||
'contentAreaClick2' in window.instaclick &&
|
||||
TreeStyleTabUtils.getTreePref('compatibility.InstaClick')) {
|
||||
eval('instaclick.contentAreaClick2 = '+
|
||||
instaclick.contentAreaClick2.toSource().replace(
|
||||
'gBrowser.loadOneTab(',
|
||||
'TreeStyleTabService.readyToOpenChildTab(); $&'
|
||||
)
|
||||
);
|
||||
TreeStyleTabUtils.getTreePref('compatibility.InstaClick') &&
|
||||
!instaclick.__treestyletab__contentAreaClick2) {
|
||||
instaclick.__treestyletab__contentAreaClick2 = instaclick.contentAreaClick2;
|
||||
instaclick.contentAreaClick2 = function(...aArgs) {
|
||||
TreeStyleTabService.readyToOpenChildTabNow();
|
||||
return this.__treestyletab__contentAreaClick2(...aArgs);
|
||||
};
|
||||
}
|
||||
|
||||
// Duplicate This Tab
|
||||
|
Loading…
Reference in New Issue
Block a user