Reduce use of eval()

This commit is contained in:
YUKI Hiroshi 2016-09-05 16:32:28 +09:00
parent 7b820848f8
commit f9b1508e9c

View File

@ -571,13 +571,13 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
// https://addons.mozilla.org/firefox/addon/instaclick/ // https://addons.mozilla.org/firefox/addon/instaclick/
if ('instaclick' in window && if ('instaclick' in window &&
'contentAreaClick2' in window.instaclick && 'contentAreaClick2' in window.instaclick &&
TreeStyleTabUtils.getTreePref('compatibility.InstaClick')) { TreeStyleTabUtils.getTreePref('compatibility.InstaClick') &&
eval('instaclick.contentAreaClick2 = '+ !instaclick.__treestyletab__contentAreaClick2) {
instaclick.contentAreaClick2.toSource().replace( instaclick.__treestyletab__contentAreaClick2 = instaclick.contentAreaClick2;
'gBrowser.loadOneTab(', instaclick.contentAreaClick2 = function(...aArgs) {
'TreeStyleTabService.readyToOpenChildTab(); $&' TreeStyleTabService.readyToOpenChildTabNow();
) return this.__treestyletab__contentAreaClick2(...aArgs);
); };
} }
// Duplicate This Tab // Duplicate This Tab