Don't apply hack multiple times

This commit is contained in:
YUKI Hiroshi 2016-09-05 14:41:24 +09:00
parent 0e3b91c362
commit 104c46d6aa

View File

@ -533,8 +533,11 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
for (let i = 0, maxi = methods.length; i < maxi; i++)
{
let method = methods[i];
if (!(method in LinkyContext.prototype)) continue;
if (!(method in LinkyContext.prototype) ||
LinkyContext.prototype['__treestyletab__' + method])
continue;
let orig = LinkyContext.prototype[method];
LinkyContext.prototype['__treestyletab__' + method] = orig;
LinkyContext.prototype[method] = function(...aArgs) {
TreeStyleTabService.readyToOpenChildTabNow(null, true);
return orig.call(this, ...aArgs);