[Pkg-mozext-commits] [tabmixplus] 15/47: Remove 'hacks' for old versions of treeStyleTab extension
David Prévot
taffit at moszumanska.debian.org
Fri Sep 26 20:57:00 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch upstream
in repository tabmixplus.
commit 01af6bbf9dbcb423aae662b31e688a454f23f66c
Author: onemen <tabmix.onemen at gmail.com>
Date: Fri Sep 19 14:30:30 2014 +0300
Remove 'hacks' for old versions of treeStyleTab extension
---
chrome/content/extensions/extensions.js | 57 ---------------------------------
chrome/content/tabmix.js | 5 ---
2 files changed, 62 deletions(-)
diff --git a/chrome/content/extensions/extensions.js b/chrome/content/extensions/extensions.js
index 5ea8bae..f3db34e 100644
--- a/chrome/content/extensions/extensions.js
+++ b/chrome/content/extensions/extensions.js
@@ -546,13 +546,6 @@ TMP_extensionsCompatibility.newsfox = {
*/
TMP_extensionsCompatibility.treeStyleTab = {
errorMsg: "Error in Tabmix when trying to load compatible functions with TreeStyleTab extension",
- // flag for version after 2011.01.13.01
- isNewVersion: function () {
- try {
- return TreeStyleTabService.overrideExtensionsOnInitAfter.toString().indexOf("TabmixTabbar") != -1;
- } catch (ex) {}
- return false;
- },
preInit: function () {
if (typeof TreeStyleTabWindowHelper.overrideExtensionsPreInit == "function") {
@@ -572,56 +565,6 @@ TMP_extensionsCompatibility.treeStyleTab = {
},
onContentLoaded: function () {
- if (!this.isNewVersion) {
- if ("overrideExtensionsOnInitAfter" in TreeStyleTabService) {
- // TMupdateSettings replaced with TabmixTabbar.updateSettings
- // TabDNDObserver replaced with TMP_tabDNDObserver
- // tabBarScrollStatus replaced with TabmixTabbar.updateScrollStatus
-
- Tabmix.changeCode(TreeStyleTabService, "TreeStyleTabService.overrideExtensionsOnInitAfter")._replace(
- '{', '{var TabDNDObserver = TMP_tabDNDObserver;'
- )._replace(
- 'this.updateTabDNDObserver(TabDNDObserver);',
- 'this.updateTabDNDObserver(gBrowser);'
- )._replace( /* we don't need it, tabmix Tabmix.browserHome calls gBrowser.loadTabs */
- 'eval("window.TM_BrowserHome = "',
- 'if (false) $&'
- )._replace(
- '"TMupdateSettings" in window', 'true'
- )._replace(
- 'TMupdateSettings',
- 'TabmixTabbar.updateSettings', {flags: "g"}
- )._replace(
- 'tabBarScrollStatus()',
- 'TabmixTabbar.updateScrollStatus()'
- )._replace(
- 'window.tabscroll == 2;',
- 'window.TabmixTabbar.isMultiRow;'
- )._replace(
- 'getRowHeight',
- 'TabmixTabbar.getRowHeight', {flags: "g"}
- ).toCode();
-
- /* for treeStyleTab extension look in treeStyleTab hacks.js
- we remove tabxTabAdded function and use TMP_eventListener.onTabOpen from 0.3.7pre.080815
- */
- window.tabxTabAdded = function _tabxTabAdded() {
- // remove eventListener added by treeStyleTab on first call to tabxTabAdded
- gBrowser.tabContainer.removeEventListener('DOMNodeInserted', tabxTabAdded, true);
- return;
- }
- }
-
- if ('piro.sakura.ne.jp' in window && "tabsDragUtils" in window['piro.sakura.ne.jp']) {
- let tabsDragUtils = window['piro.sakura.ne.jp'].tabsDragUtils;
- Tabmix.changeCode(tabsDragUtils, "tabsDragUtils._delayedInit")._replace(
- 'if ("TabDNDObserver" in window)',
- 'this.initTabDNDObserver(TMP_tabDNDObserver);\
- $&'
- ).toCode(false, tabsDragUtils, "_delayedInit");
- }
- }
-
if ("TreeStyleTabBrowser" in window) {
// we don't need this in the new version since we change the tabs-frame place
// keep it here for non default theme that uses old Tabmix binding
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index f833426..c80465c 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -1051,11 +1051,6 @@ var TMP_eventListener = {
TMP_TabView._resetTabviewFrame();
gBrowser.mPanelContainer.removeEventListener("click", Tabmix.contentAreaClick._contentLinkClick, true);
- // TreeStyleTab extension add this to be compatible with old tabmix version
- // we call removeEventListener again here in case user close the window without opening new tabs
- if ("TreeStyleTabBrowser" in window && "tabxTabAdded" in window)
- gBrowser.tabContainer.removeEventListener('DOMNodeInserted', tabxTabAdded, true);
-
gTMPprefObserver.removeObservers();
gTMPprefObserver.dynamicRules = null;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list