[Pkg-mozext-commits] [tabmixplus] 18/26: Remove support for Firefox 24
David Prévot
taffit at moszumanska.debian.org
Fri Mar 25 21:56:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag 0.4.2.3pre.160319a1
in repository tabmixplus.
commit 014933232ad80a37cb40ae45916e68064e267049
Author: onemen <tabmix.onemen at gmail.com>
Date: Sun Mar 13 00:59:24 2016 +0200
Remove support for Firefox 24
---
chrome/content/minit/minit.js | 37 +++++----------------------------
chrome/content/minit/tabView.js | 1 -
chrome/content/minit/tablib.js | 4 ++--
chrome/content/session/session.js | 1 -
chrome/content/session/sessionStore.js | 17 ---------------
modules/Services.jsm | 20 +++++++-----------
modules/extensions/TabGroupsManager.jsm | 2 --
7 files changed, 15 insertions(+), 67 deletions(-)
diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index 1c6461d..f7e2470 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -1191,11 +1191,8 @@ Tabmix.navToolbox = {
Tabmix.originalFunctions.oldHandleCommand.toString().indexOf(TMP_fn) > -1)
return;
- // InstantFox extension uses old version of gURLBar.handleCommand until Firefox 25
- let instantFox = !Tabmix.isVersion(250, 250) && typeof InstantFox == "object";
-
// we don't do anything regarding IeTab and URL Suffix extensions
- _handleCommand = Tabmix.changeCode(obj, "gURLBar." + fn, {silent: this.urlBarInitialized})._replace(
+ Tabmix.changeCode(obj, "gURLBar." + fn, {silent: this.urlBarInitialized})._replace(
'{',
'{\
if (Tabmix.selectedTab) {\
@@ -1206,11 +1203,11 @@ Tabmix.navToolbox = {
'if (isMouseEvent || altEnter) {',
'let loadNewTab = Tabmix.whereToOpen("extensions.tabmix.opentabfor.urlbar", altEnter).inNew &&\
!(/^ *javascript:/.test(url));\
- if (isMouseEvent || altEnter || loadNewTab) {', {check: !instantFox}
+ if (isMouseEvent || altEnter || loadNewTab) {'
)._replace(
// always check whereToOpenLink except for alt to catch also ctrl/meta
'if (isMouseEvent)',
- 'if (isMouseEvent || aTriggeringEvent && !altEnter)', {check: !instantFox}
+ 'if (isMouseEvent || aTriggeringEvent && !altEnter)'
)._replace(
'where = whereToOpenLink(aTriggeringEvent, false, false);',
'$&\
@@ -1222,32 +1219,8 @@ Tabmix.navToolbox = {
)._replace(
'openUILinkIn(url, where, params);',
'params.inBackground = Tabmix.prefs.getBoolPref("loadUrlInBackground");\
- $&', {check: !instantFox}
- );
-
- if (instantFox) {
- _handleCommand._replace(
- 'if (aTriggeringEvent instanceof MouseEvent) {',
- 'let isMouseEvent = aTriggeringEvent instanceof MouseEvent;\
- let tabEmpty = !isTabEmpty(gBrowser.selectedTab);\
- let altEnter = !isMouseEvent && aTriggeringEvent && aTriggeringEvent.altKey && !tabEmpty;\
- let loadNewTab = InstantFoxModule.currentQuery && InstantFoxModule.openSearchInNewTab && !tabEmpty ||\
- Tabmix.whereToOpen("extensions.tabmix.opentabfor.urlbar", altEnter).inNew &&\
- !(/^ *javascript:/.test(url));\
- let inBackground = Tabmix.prefs.getBoolPref("loadUrlInBackground");\
- $&'
- )._replace(
- 'allowThirdPartyFixup: true, postData: postData',
- '$&, inBackground: inBackground'
- )._replace(
- '} else if (aTriggeringEvent && aTriggeringEvent.altKey && !isTabEmpty(gBrowser.selectedTab)) {',
- '} else if (loadNewTab) {'
- )._replace(
- 'inBackground: false',
- 'inBackground: inBackground'
- );
- }
- _handleCommand.toCode();
+ $&'
+ ).toCode();
// don't call ChangeCode.isValidToChange after urlbar initialized,
// we can only lost our changes if user customized the toolbar and remove urlbar
diff --git a/chrome/content/minit/tabView.js b/chrome/content/minit/tabView.js
index d696e41..2ba16e8 100644
--- a/chrome/content/minit/tabView.js
+++ b/chrome/content/minit/tabView.js
@@ -200,7 +200,6 @@
return;
}
- TMP_SessionStore.initService();
this._getSessionTabviewData(winData);
this._updateUIpageBounds = false;
};
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index 8ff49a2..90c8801 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -568,10 +568,10 @@ var tablib = { // eslint-disable-line
Tabmix.changeCode(window, "handleDroppedLink")._replace(
'loadURI(uri, null, postData.value, false);',
- 'tablib.contentAreaOnDrop(event, url, postData.value);', {check: !Tabmix.isVersion(250)}
+ 'tablib.contentAreaOnDrop(event, url, postData.value);', {check: TabmixSvc.isPaleMoon}
)._replace(
'loadURI(data.url, null, data.postData, false);',
- 'tablib.contentAreaOnDrop(event, data.url, data.postData);', {check: Tabmix.isVersion(250)}
+ 'tablib.contentAreaOnDrop(event, data.url, data.postData);', {check: !TabmixSvc.isPaleMoon}
).toCode();
// update current browser
gBrowser.selectedBrowser.droppedLinkHandler = handleDroppedLink;
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index dcd5ee0..db3f061 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -2375,7 +2375,6 @@ TabmixSessionManager = {
this.saveStateDelayed();
// now that we open our tabs init TabView again
- TMP_SessionStore.initService();
if (this.tabViewInstalled)
TabView.init();
diff --git a/chrome/content/session/sessionStore.js b/chrome/content/session/sessionStore.js
index 027dcb3..4e726e6 100644
--- a/chrome/content/session/sessionStore.js
+++ b/chrome/content/session/sessionStore.js
@@ -7,21 +7,6 @@
*
*/
var TMP_SessionStore = { // jshint ignore:line
- // make sure sessionstore is init
- _ssInited: null,
- initService: function TMP_ss_start() {
- if (Tabmix.isVersion(250, 250) || this._ssInited)
- return;
- try {
- TabmixSvc.ss.init(window);
- this._ssInited = true;
- } catch (ex) {
- dump("nsSessionStore could not be initialized: " + ex + "\n");
- Tabmix.assert(ex);
- return;
- }
- },
-
// get title for closed window from bookmark title or user tab title
getTitleForClosedWindow: function TMP_ss_getTitleForClosedWindow(aUndoItem) {
// if user already rename this item wo don't use other title
@@ -238,8 +223,6 @@ var TMP_SessionStore = { // jshint ignore:line
let ss = Cc["@mozilla.org/browser/sessionstartup;1"].
getService(Ci.nsISessionStartup);
// when TMP session manager is enabled ss.doRestore is true only after restart
- if (!Tabmix.isVersion(250, 250))
- return ss.doRestore();
ss.onceInitialized.then(function() {
Tabmix.isWindowAfterSessionRestore = ss.doRestore();
}).then(null, Tabmix.reportError);
diff --git a/modules/Services.jsm b/modules/Services.jsm
index 2c0c96e..c567c70 100644
--- a/modules/Services.jsm
+++ b/modules/Services.jsm
@@ -229,17 +229,6 @@ this.TabmixSvc = {
tabStateCache.saveTabAttributes(tab, attrib, save);
},
- get ss() {
- delete this.ss;
- if (isVersion(250, 250)) {
- let tmp = {};
- Cu.import("resource:///modules/sessionstore/SessionStore.jsm", tmp);
- return (this.ss = tmp.SessionStore);
- }
- return (this.ss = Cc["@mozilla.org/browser/sessionstore;1"].
- getService(Ci.nsISessionStore));
- },
-
sm: {
lastSessionPath: null,
persistTabAttributeSet: false,
@@ -329,6 +318,12 @@ XPCOMUtils.defineLazyModuleGetter(TabmixSvc, "FileUtils",
XPCOMUtils.defineLazyModuleGetter(TabmixSvc, "console",
"resource://tabmixplus/log.jsm");
+XPCOMUtils.defineLazyGetter(TabmixSvc, "ss", function() {
+ let tmp = {};
+ Cu.import("resource:///modules/sessionstore/SessionStore.jsm", tmp);
+ return tmp.SessionStore;
+});
+
XPCOMUtils.defineLazyGetter(TabmixSvc, "SessionStoreGlobal", function() {
return Cu.getGlobalForObject(this.ss);
});
@@ -353,8 +348,9 @@ tabStateCache = {
},
saveTabAttributes: function(tab, attrib, save = true) {
- if (!isVersion(250))
+ if (TabmixSvc.isPaleMoon) {
return;
+ }
// force Sessionstore to save our persisted tab attributes
if (save) {
diff --git a/modules/extensions/TabGroupsManager.jsm b/modules/extensions/TabGroupsManager.jsm
index 94749b5..a627b3c 100644
--- a/modules/extensions/TabGroupsManager.jsm
+++ b/modules/extensions/TabGroupsManager.jsm
@@ -82,8 +82,6 @@ this.TMP_TabGroupsManager = {
' let jsonText = this.getLiteralValue(rdfNodeWindow, "tgm_jsonText");' +
' TabGroupsManager.session.groupRestored = 1;' +
' if (jsonText) {' +
- ' /* make sure sessionstore is init */' +
- ' TMP_SessionStore.initService();' +
' if ("__SSi" in window)' +
' TabmixSvc.ss.setWindowValue(window, "TabGroupsManagerAllGroupsData", decodeURI(jsonText));' +
' TabGroupsManager.allGroups.loadAllGroupsData();' +
--
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