Reduce use of eval()

This commit is contained in:
YUKI Hiroshi 2016-09-05 16:24:51 +09:00
parent 750ada61d8
commit 290b124333

View File

@ -475,13 +475,13 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
// https://addons.mozilla.org/firefox/addon/quickdrag/ // https://addons.mozilla.org/firefox/addon/quickdrag/
if ('QuickDrag' in window && if ('QuickDrag' in window &&
'_loadTab' in QuickDrag && '_loadTab' in QuickDrag &&
TreeStyleTabUtils.getTreePref('compatibility.QuickDrag')) { TreeStyleTabUtils.getTreePref('compatibility.QuickDrag') &&
eval('QuickDrag._loadTab = '+ !QuickDrag.__treestyletab__loadTab) {
QuickDrag._loadTab.toSource().replace( QuickDrag.__treestyletab__loadTab = QuickDrag._loadTab;
/(gBrowser.loadOneTab\()/g, QuickDrag._loadTab = function(...aArgs) {
'TreeStyleTabService.readyToOpenChildTab(), $1' TreeStyleTabService.readyToOpenChildTabNow();
) return this.__treestyletab__loadTab(...aArgs);
); };
} }
// Google Toolbar Sidewiki // Google Toolbar Sidewiki