[Pkg-mozext-commits] [automatic-save-folder] 118/133: Fixed default folder always falling back to desktop when no filter matched (Firefox 27+ only?)

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 455892c94352c525fc67459ef348fb5046a6eedf
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date:   Sun Jun 1 17:58:39 2014 +0000

    Fixed default folder always falling back to desktop
    when no filter matched (Firefox 27+ only?)
    
    git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@127 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
 content/asf_download.js     | 23 ++++++++++++-----------
 content/asf_right_click.js  | 18 +++++++++---------
 content/common.dtd          |  2 +-
 defaults/preferences/asf.js |  2 +-
 4 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/content/asf_download.js b/content/asf_download.js
index 42c9c7a..ec3c791 100644
--- a/content/asf_download.js
+++ b/content/asf_download.js
@@ -147,7 +147,7 @@ Copyright (C) 2007-2012 Éric Cassar (Cyan).
 		}
 		
 		// set the last saved path into asf.lastpath
-		if (this.firefoxversion >= "3")   // take the download.lastDir if it's FF3
+		if (this.firefoxversion >= 3)   // take the download.lastDir if it's FF3
 		{
 			var folder = this.loadUnicodeString("browser.download.lastDir");
 		}
@@ -254,16 +254,17 @@ Copyright (C) 2007-2012 Éric Cassar (Cyan).
 			if(savetype == 1)  // and folder is set to user choice
 			{
 				if ( (keeptemp == false) || ((keeptemp == true) && ( tempdomain != domain )) ) // and, if [same domain not checked] OR [ if same domain (keeptemp) is checked and domain not same as previous one]
-				{	// then change the destination folder to user choice
+				{	
+					// then change the destination folder to user choice
 					this.set_savepath(defaultfolder);
 				}
 				else  // else, if domain is the same as the last, and the user checked "use the same folder if same domain"
 				{
-					if (this.firefoxversion >= "3")
+					if (this.firefoxversion >= 3)
 					{
 						var lastpath = this.loadUnicodeString("browser.download.lastDir");
 					}
-					if (this.firefoxversion == "2")
+					if (this.firefoxversion == 2)
 					{
 						var lastpath = this.loadUnicodeString("browser.download.dir");
 					}
@@ -277,11 +278,11 @@ Copyright (C) 2007-2012 Éric Cassar (Cyan).
 			}
 			else // else, if savetype == 0  (folder is set to last folder)
 			{
-				if (this.firefoxversion >= "3")
+				if (this.firefoxversion >= 3)
 				{
 					var lastpath = this.loadUnicodeString("browser.download.lastDir");
 				}
-				if (this.firefoxversion == "2")
+				if (this.firefoxversion == 2)
 				{
 					var lastpath = this.loadUnicodeString("browser.download.dir");
 				}
@@ -1245,23 +1246,23 @@ Copyright (C) 2007-2012 Éric Cassar (Cyan).
 
 		if (this.versionChecker.compare(this.appInfo.version, "26.0") >= 0)
 		{
-			this.firefoxversion = "26";
+			this.firefoxversion = 26;
 		}
 		else if (this.versionChecker.compare(this.appInfo.version, "7.0.1") >= 0)
 		{
-			this.firefoxversion = "7.01";
+			this.firefoxversion = 7.01;
 		}
 		else if (this.versionChecker.compare(this.appInfo.version, "4.0b1") >= 0)
 		{
-			this.firefoxversion = "4";
+			this.firefoxversion = 4;
 		}
 		else if(this.versionChecker.compare(this.appInfo.version, "3.0") >= 0) 
 		{
-			this.firefoxversion = "3";
+			this.firefoxversion = 3;
 		}
 		else 
 		{
-			this.firefoxversion = "2";
+			this.firefoxversion = 2;
 		}
 	},
 
diff --git a/content/asf_right_click.js b/content/asf_right_click.js
index 112137a..fbdfad8 100644
--- a/content/asf_right_click.js
+++ b/content/asf_right_click.js
@@ -208,7 +208,7 @@ var automatic_save_folder = {
 			}
 			
 			// set the last folder path used into asf.lastpath
-			if (this.firefoxversion >= "3")   // take the download.lastDir if it's FF3
+			if (this.firefoxversion >= 3)   // take the download.lastDir if it's FF3
 			{
 				var folder = this.loadUnicodeString("browser.download.lastDir");
 			}
@@ -318,11 +318,11 @@ var automatic_save_folder = {
 					}	
 					else  // else, if domain is the same as the last, and the user checked "use the same folder if same domain"
 					{
-						if (this.firefoxversion >= "3")
+						if (this.firefoxversion >= 3)
 						{
 							var lastpath = this.loadUnicodeString("browser.download.lastDir");
 						}
-						if (this.firefoxversion == "2")
+						if (this.firefoxversion == 2)
 						{
 							var lastpath = this.loadUnicodeString("browser.download.dir");
 						}
@@ -336,11 +336,11 @@ var automatic_save_folder = {
 				}
 				else // else, if savetype == 0  (folder is set to last folder)
 				{
-					if (this.firefoxversion >= "3")
+					if (this.firefoxversion >= 3)
 					{
 						var lastpath = this.loadUnicodeString("browser.download.lastDir");
 					}
-					if (this.firefoxversion == "2")
+					if (this.firefoxversion == 2)
 					{
 						var lastpath = this.loadUnicodeString("browser.download.dir");
 					}
@@ -867,19 +867,19 @@ var automatic_save_folder = {
 		
 		if (this.versionChecker.compare(this.appInfo.version, "7.0.1") >= 0)
 		{
-			this.firefoxversion = "7.01";
+			this.firefoxversion = 7.01;
 		}
 		else if (this.versionChecker.compare(this.appInfo.version, "4.0b1") >= 0)
 		{
-			this.firefoxversion = "4";
+			this.firefoxversion = 4;
 		}
 		else if(this.versionChecker.compare(this.appInfo.version, "3.0") >= 0) 
 		{
-			this.firefoxversion = "3";
+			this.firefoxversion = 3;
 		}
 		else 
 		{
-			this.firefoxversion = "2";
+			this.firefoxversion = 2;
 		}
 	},
 	
diff --git a/content/common.dtd b/content/common.dtd
index 26fb03e..45c61af 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.5bRev126">
+<!ENTITY asf.version "1.0.5bRev127">
 
 <!ENTITY about.translators "
 - cs : Stanislav Horáček<br />
diff --git a/defaults/preferences/asf.js b/defaults/preferences/asf.js
index c3d5d25..a106e0f 100644
--- a/defaults/preferences/asf.js
+++ b/defaults/preferences/asf.js
@@ -1,4 +1,4 @@
- pref("extensions.asf.currentVersion", "1.0.5bRev126");
+ pref("extensions.asf.currentVersion", "1.0.5bRev127");
  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