Better compatibility with Duplicate in Tab Context Menu addon #835

https://addons.mozilla.org/firefox/duplicate-in-tab-context-menu/
This commit is contained in:
Piro / YUKI Hiroshi 2015-03-02 01:53:24 +09:00
parent 10c0108f40
commit c93270dff6
2 changed files with 15 additions and 0 deletions

View File

@ -352,6 +352,20 @@ TreeStyleTabWindowHelper.overrideExtensionsPreInit = function TSTWH_overrideExte
dump(e+'\n');
}
}
// Duplicate in Tab Context Menu
// https://addons.mozilla.org/firefox/duplicate-in-tab-context-menu/
if (TreeStyleTabUtils.getTreePref('compatibility.DuplicateInTabContext') &&
'SchuzakJp' in window &&
'DuplicateInTabContext' in SchuzakJp &&
typeof SchuzakJp.DuplicateInTabContext.Duplicate == 'function') {
TreeStyleTabUtils.doPatching(SchuzakJp.DuplicateInTabContext.Duplicate, 'SchuzakJp.DuplicateInTabContext.Duplicate', function(aName, aSource) {
return eval(aName+' = '+aSource.replace(
'{',
'{ gBrowser.treeStyleTab.onBeforeTabDuplicate(oriTab); '
));
}, 'treeStyleTab');
}
};
TreeStyleTabWindowHelper.overrideExtensionsBeforeBrowserInit = function TSTWH_overrideExtensionsBeforeBrowserInit() {

View File

@ -652,6 +652,7 @@ pref("extensions.treestyletab.compatibility.DomainTab", true);
pref("extensions.treestyletab.compatibility.DragDeGo", true);
pref("extensions.treestyletab.compatibility.DragIt", true);
pref("extensions.treestyletab.compatibility.DragNDropToolbars", true);
pref("extensions.treestyletab.compatibility.DuplicateInTabContext", true);
pref("extensions.treestyletab.compatibility.DuplicateThisTab", true);
pref("extensions.treestyletab.compatibility.FirefoxSync", true);
pref("extensions.treestyletab.compatibility.FireGestures", true);