[Pkg-mozext-commits] [tabmixplus] 02/32: Add '_afterTabduplicated' property directly to Tabmix
David Prévot
taffit at moszumanska.debian.org
Sun Feb 7 19:23:12 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 22f0a7465ec8f56a88e5213d5c08ec6543abd747
Author: onemen <tabmix.onemen at gmail.com>
Date: Mon Dec 28 09:09:17 2015 +0200
Add '_afterTabduplicated' property directly to Tabmix
---
chrome/content/links/setup.js | 2 +-
chrome/content/session/session.js | 2 +-
chrome/content/session/sessionStore.js | 3 ++-
modules/extensions/TabGroupsManager.jsm | 3 ++-
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/chrome/content/links/setup.js b/chrome/content/links/setup.js
index 193119d..59da768 100644
--- a/chrome/content/links/setup.js
+++ b/chrome/content/links/setup.js
@@ -108,7 +108,7 @@ Tabmix.beforeBrowserInitOnLoad = function() {
'gBrowser.swapBrowsersAndCloseOther(gBrowser.selectedTab, uriToLoad);';
var loadOnStartup, swapNewCode =
' if (!Tabmix.singleWindowMode) {' +
- ' window.tabmix_afterTabduplicated = true;' +
+ ' Tabmix._afterTabduplicated = true;' +
' TabmixSessionManager.init();' +
' let remoteBrowser = uriToLoad.ownerDocument.defaultView.gBrowser;' +
' let url = remoteBrowser.getBrowserForTab(uriToLoad).currentURI.spec;' +
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index ee2d3fd..cc9133c 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -291,7 +291,7 @@ var TabmixSessionManager = { // jshint ignore:line
// we can get here before the browser window is loaded
tablib.init();
- var _afterTabduplicated = "tabmix_afterTabduplicated" in window && window.tabmix_afterTabduplicated;
+ var _afterTabduplicated = "_afterTabduplicated" in Tabmix && Tabmix._afterTabduplicated;
var isFirstWindow = (Tabmix.isFirstWindow || this.firstNonPrivateWindow) && !_afterTabduplicated;
this.enableManager = this.prefBranch.getBoolPref("manager") && !this.globalPrivateBrowsing;
diff --git a/chrome/content/session/sessionStore.js b/chrome/content/session/sessionStore.js
index 1ee0995..2b8a372 100644
--- a/chrome/content/session/sessionStore.js
+++ b/chrome/content/session/sessionStore.js
@@ -667,8 +667,9 @@ var TabmixConvertSession = { // jshint ignore:line
if (!Tabmix.firstWindowInSession)
return;
- if (!Tabmix.extensions.sessionManager || "tabmix_afterTabduplicated" in window || !Tabmix.isFirstWindow)
+ if (!Tabmix.extensions.sessionManager || Tabmix._afterTabduplicated || !Tabmix.isFirstWindow) {
return;
+ }
var sessions = TabmixSessionManager.getSessionList();
if (!sessions)
diff --git a/modules/extensions/TabGroupsManager.jsm b/modules/extensions/TabGroupsManager.jsm
index ebea914..94749b5 100644
--- a/modules/extensions/TabGroupsManager.jsm
+++ b/modules/extensions/TabGroupsManager.jsm
@@ -125,8 +125,9 @@ this.TMP_TabGroupsManager = {
// for TabGroupsManager use - don't change function name
tabmixSessionsManager: function() {
// this here reffer to the top browser window
- if (!this.Tabmix.isFirstWindow || "tabmix_afterTabduplicated" in this)
+ if (!this.Tabmix.isFirstWindow || this.Tabmix._afterTabduplicated) {
return false;
+ }
return this.Tabmix.prefs.getBoolPref("sessions.manager") &&
(!this.Tabmix.isWindowAfterSessionRestore || "tabmixdata" in this);
--
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