[Pkg-mozext-commits] [automatic-save-folder] 116/133: Fix: * Fixed DownThemAll detection * Fixed Private Browsing detection on FF3.0 or older

David Prévot taffit at moszumanska.debian.org
Mon Apr 27 20:33:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch wip
in repository automatic-save-folder.

commit d8eb00ed04398c392b48a0703b6f7c2d2acabbe0
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date:   Sat Mar 16 12:18:44 2013 +0000

    Fix:
    * Fixed DownThemAll detection
    * Fixed Private Browsing detection on FF3.0 or older
    
    git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@125 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
 content/asf_download.js     | 14 +++++++-------
 content/asf_right_click.js  | 19 ++++++++++---------
 content/common.dtd          |  2 +-
 defaults/preferences/asf.js |  2 +-
 4 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/content/asf_download.js b/content/asf_download.js
index 8d6554d..651cbba 100644
--- a/content/asf_download.js
+++ b/content/asf_download.js
@@ -65,11 +65,8 @@ Copyright (C) 2007-2012 Éric Cassar (Cyan).
 			{
 				this.inPrivateBrowsing = mainWindow.gBrowser.docShell.QueryInterface(Components.interfaces.nsILoadContext).usePrivateBrowsing;
 			}
-		}
-
-		// Enable Private Browsing support with filepicker - Thanks to Ehsan Akhgari at http://ehsanakhgari.org/
-		if (this.versionChecker.compare(this.appInfo.version, "3.5") >= 0)
-		{
+			
+			// Enable Private Browsing support with filepicker - Thanks to Ehsan Akhgari at http://ehsanakhgari.org/
 			Components.utils.import("resource://gre/modules/DownloadLastDir.jsm");
 			
 			// since 2012-07-21, it uses a per-window privacy status instead of global service. (https://bugzilla.mozilla.org/show_bug.cgi?id=722995 ; https://hg.mozilla.org/mozilla-central/rev/03cd2ad254cc)
@@ -395,7 +392,7 @@ Copyright (C) 2007-2012 Éric Cassar (Cyan).
 		var directory = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);		
 		
 		// since 2012-07-21 gDownloadLastDir uses a per-window privacy status instead of global service.
-		if (typeof(gDownloadLastDir) != "object")
+		if (this.versionChecker.compare(this.appInfo.version, "3.5") >= 0 && typeof(gDownloadLastDir) != "object")
 		{
 			var downloadModule = {};
 			var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
@@ -1007,7 +1004,7 @@ Copyright (C) 2007-2012 Éric Cassar (Cyan).
 		var asf_viewpathselect = this.prefManager.getBoolPref("extensions.asf.viewpathselect");
 		var folderList = this.prefManager.getIntPref("browser.download.folderList");
 		var dTa = false;
-		if (this.DownThemAll_isEnabled) // enable ASF box if dTa is selected and sending folder to dTa is enabled.
+		if (this.DownThemAll_isEnabled()) // enable ASF box if dTa is selected and sending folder to dTa is enabled.
 		{
 			dTa = this.prefManager.getBoolPref("extensions.asf.dta_ASFtoDTA_isActive") && (document.getElementById("downthemall").selected || document.getElementById("turbodta").selected);
 		}
@@ -1305,6 +1302,9 @@ Copyright (C) 2007-2012 Éric Cassar (Cyan).
 		var addon_GUUID = "dta at downthemall.net";
 		var DTA = enabledItems.indexOf(addon_GUUID,0);
 		if (DTA >= 0) return true;
+		var addon_GUUID = "dta%40downthemall.net";
+		var DTA = enabledItems.indexOf(addon_GUUID,0);
+		if (DTA >= 0) return true;
 		
 		return false;
 	},
diff --git a/content/asf_right_click.js b/content/asf_right_click.js
index 6e6558a..b310070 100644
--- a/content/asf_right_click.js
+++ b/content/asf_right_click.js
@@ -120,15 +120,16 @@ var automatic_save_folder = {
 				{
 					this.inPrivateBrowsing = mainWindow.gBrowser.docShell.QueryInterface(Components.interfaces.nsILoadContext).usePrivateBrowsing;
 				}
+				
 				Components.utils.import("resource://gre/modules/DownloadLastDir.jsm");
-			}
-			
-			// since 2012-07-21 gDownloadLastDir uses a per-window privacy status instead of global service. (https://bugzilla.mozilla.org/show_bug.cgi?id=722995 ; https://hg.mozilla.org/mozilla-central/rev/03cd2ad254cc)
-			if (typeof(gDownloadLastDir) != "object" && this.versionChecker.compare(this.appInfo.version, "3.5") >= 0) // gDownloadLastDir is only in 3.5+, prevents error on old Firefox (I'll remove support of old versions soon)
-			{
-				var downloadModule = {};
-				Components.utils.import("resource://gre/modules/DownloadLastDir.jsm", downloadModule);
-				gDownloadLastDir = new downloadModule.DownloadLastDir(mainWindow); // Load gDownloadLastDir for the active window
+				
+				// since 2012-07-21 gDownloadLastDir uses a per-window privacy status instead of global service. (https://bugzilla.mozilla.org/show_bug.cgi?id=722995 ; https://hg.mozilla.org/mozilla-central/rev/03cd2ad254cc)
+				if (typeof(gDownloadLastDir) != "object")
+				{
+					var downloadModule = {};
+					Components.utils.import("resource://gre/modules/DownloadLastDir.jsm", downloadModule);
+					gDownloadLastDir = new downloadModule.DownloadLastDir(mainWindow); // Load gDownloadLastDir for the active window
+				}
 			}
 			
 			var tabURL = mainWindow.gURLBar.value;
@@ -373,7 +374,7 @@ var automatic_save_folder = {
 		var directory = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
 		
 		// since 2012-07-21 gDownloadLastDir uses a per-window privacy status instead of global service.
-		if (typeof(gDownloadLastDir) != "object" && this.versionChecker.compare(this.appInfo.version, "3.5") >= 0)
+		if (this.versionChecker.compare(this.appInfo.version, "3.5") >= 0 && typeof(gDownloadLastDir) != "object")
 		{
 			var downloadModule = {};
 			var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
diff --git a/content/common.dtd b/content/common.dtd
index c8af818..bb0f8f2 100644
--- a/content/common.dtd
+++ b/content/common.dtd
@@ -1,7 +1,7 @@
 <!-- Strings which don't need a translation -->
 
 <!-- Current version -->
-<!ENTITY asf.version "1.0.5bRev124">
+<!ENTITY asf.version "1.0.5bRev125">
 
 <!ENTITY about.translators "
 - cs : Stanislav Horáček<br />
diff --git a/defaults/preferences/asf.js b/defaults/preferences/asf.js
index 31d5407..0600364 100644
--- a/defaults/preferences/asf.js
+++ b/defaults/preferences/asf.js
@@ -1,4 +1,4 @@
- pref("extensions.asf.currentVersion", "1.0.5bRev124");
+ pref("extensions.asf.currentVersion", "1.0.5bRev125");
  pref("extensions.asf.lastdir", true);
  pref("extensions.asf.keeptemp", true);
  pref("extensions.asf.viewdloption", false);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/automatic-save-folder.git



More information about the Pkg-mozext-commits mailing list