[Pkg-mozext-commits] [automatic-save-folder] 117/133: Fix: * Fixed Right-Click saving on Firefox 27.0.1+ * Fixed filtering while the target folder contains regexp special characters. (Thanks to Ziceptor)
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 e48ed8c8acdb01e04ab78ef71448457f80d61117
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date: Sat May 10 14:57:55 2014 +0000
Fix:
* Fixed Right-Click saving on Firefox 27.0.1+
* Fixed filtering while the target folder contains regexp
special characters. (Thanks to Ziceptor)
git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@126 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
content/asf_download.js | 20 +++++++++++++++++---
content/asf_right_click.js | 25 ++++++++++++++++++++++++-
content/common.dtd | 2 +-
content/help/about.xhtml | 2 +-
defaults/preferences/asf.js | 2 +-
install.rdf | 4 ++--
locale/en-US/about.dtd | 5 ++++-
locale/fr/about.dtd | 5 ++++-
8 files changed, 54 insertions(+), 11 deletions(-)
diff --git a/content/asf_download.js b/content/asf_download.js
index 651cbba..42c9c7a 100644
--- a/content/asf_download.js
+++ b/content/asf_download.js
@@ -1058,7 +1058,17 @@ Copyright (C) 2007-2012 Éric Cassar (Cyan).
indexInArray: function (arr,val){
- val = val.replace(/\\/g,'\\\\');
+ val = val.replace(/\\/g,'\\\\')
+ .replace(/\./gi, "\\.")
+ .replace(/\*/gi, "\\*")
+ .replace(/\$/gi, "\\$")
+ .replace(/\^/gi, "\\^")
+ .replace(/\+/gi, "\\+")
+ .replace(/\?/gi, "\\?")
+ .replace(/\|/gi, "\\|")
+ .replace(/\[/gi, "\\[")
+ .replace(/\]/gi, "\\]")
+ .replace(/\//gi, "\\/");
var test_regexp = new RegExp("^"+val+"$");
var data = "";
for(var i=0;i<arr.length;i++)
@@ -1232,8 +1242,12 @@ Copyright (C) 2007-2012 Éric Cassar (Cyan).
checkFirefoxVersion: function() {
-
- if (this.versionChecker.compare(this.appInfo.version, "7.0.1") >= 0)
+
+ if (this.versionChecker.compare(this.appInfo.version, "26.0") >= 0)
+ {
+ this.firefoxversion = "26";
+ }
+ else if (this.versionChecker.compare(this.appInfo.version, "7.0.1") >= 0)
{
this.firefoxversion = "7.01";
}
diff --git a/content/asf_right_click.js b/content/asf_right_click.js
index b310070..112137a 100644
--- a/content/asf_right_click.js
+++ b/content/asf_right_click.js
@@ -75,6 +75,19 @@ var automatic_save_folder = {
return original_getTargetFile.apply(window, arguments);
}
}
+ if (window.promiseTargetFile)
+ {
+ // Save a reference to the original function
+ var original_getTargetFile = window.promiseTargetFile;
+ // Override the original function
+ window.promiseTargetFile = function()
+ {
+ // Call our function before the original one
+ automatic_save_folder.rightclick_main.apply(automatic_save_folder, arguments);
+ // Execute the original function and propagate the return value
+ return original_getTargetFile.apply(window, arguments);
+ }
+ }
// Starting from firefox 3.0 there is a timeout when downloading with right-click to read header(Content-Disposition:) to rename the file in the file_explorer suggested filename.
// When timeout is set to 1000 ms (default), ASF right-click filtering is not working.
@@ -771,7 +784,17 @@ var automatic_save_folder = {
indexInArray: function (arr,val){
- val = val.replace(/\\/g,'\\\\');
+ val = val.replace(/\\/g,'\\\\')
+ .replace(/\./gi, "\\.") // thanks ziceptor
+ .replace(/\*/gi, "\\*")
+ .replace(/\$/gi, "\\$")
+ .replace(/\^/gi, "\\^")
+ .replace(/\+/gi, "\\+")
+ .replace(/\?/gi, "\\?")
+ .replace(/\|/gi, "\\|")
+ .replace(/\[/gi, "\\[")
+ .replace(/\]/gi, "\\]")
+ .replace(/\//gi, "\\/");
var test_regexp = new RegExp("^"+val+"$");
var data = "";
for(var i=0;i<arr.length;i++)
diff --git a/content/common.dtd b/content/common.dtd
index bb0f8f2..26fb03e 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.5bRev125">
+<!ENTITY asf.version "1.0.5bRev126">
<!ENTITY about.translators "
- cs : Stanislav Horáček<br />
diff --git a/content/help/about.xhtml b/content/help/about.xhtml
index d0be12c..d76808f 100644
--- a/content/help/about.xhtml
+++ b/content/help/about.xhtml
@@ -34,7 +34,7 @@
! &about.fix;
-<strong>&about.version.title; 1.0.5 :</strong> (2012 xx xx)
+<strong>&about.version.title; 1.0.5 :</strong> (2012-2014)
&about.version.105;
diff --git a/defaults/preferences/asf.js b/defaults/preferences/asf.js
index 0600364..c3d5d25 100644
--- a/defaults/preferences/asf.js
+++ b/defaults/preferences/asf.js
@@ -1,4 +1,4 @@
- pref("extensions.asf.currentVersion", "1.0.5bRev125");
+ pref("extensions.asf.currentVersion", "1.0.5bRev126");
pref("extensions.asf.lastdir", true);
pref("extensions.asf.keeptemp", true);
pref("extensions.asf.viewdloption", false);
diff --git a/install.rdf b/install.rdf
index 8f9c4ec..5f3ccb5 100644
--- a/install.rdf
+++ b/install.rdf
@@ -4,7 +4,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>asf at mangaheart.org</em:id>
<em:name>Automatic Save Folder</em:name>
- <em:version>1.0.4</em:version>
+ <em:version>1.0.5b</em:version>
<em:type>2</em:type>
<em:localized>
@@ -100,7 +100,7 @@
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!-- firefox -->
<em:minVersion>1.5</em:minVersion>
- <em:maxVersion>10.*</em:maxVersion>
+ <em:maxVersion>29.*</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
diff --git a/locale/en-US/about.dtd b/locale/en-US/about.dtd
index 3234232..0daf20a 100644
--- a/locale/en-US/about.dtd
+++ b/locale/en-US/about.dtd
@@ -38,7 +38,10 @@
! Fixed memorized state of "Force the radio choice to..." option.
! Fixed suggested save path when using right-click downloads with Firefox 7.0.1+
! Fixed Automatic Save Folder's version detection on Firefox 19+
-! Fixed other installed add-ons detection.">
+! Fixed other installed add-ons detection.
+! Fixed Private browsing on Firefox 20.0+
+! Fixed filtering while the target folder contains regexp special characters. (Thanks to Ziceptor)
+! Fixed Right-Click saving on firefox 27.0.1+">
<!ENTITY about.version.104 "* Prevent duplicated suggested folders on the save window.
! Fixed single-click saving on Firefox 7.0.1+ if the current website URI is not in the database.">
diff --git a/locale/fr/about.dtd b/locale/fr/about.dtd
index 3ac7846..096cea8 100644
--- a/locale/fr/about.dtd
+++ b/locale/fr/about.dtd
@@ -38,7 +38,10 @@
! Correction de la mémorisation de l'option "Forcer le choix sur..."
! Correction de la suggestion du dossier d'enregistrement lors d'un téléchargement utilisant clic-droit avec Firefox 7.0.1+
! Correction de la détection de la version d'Automatic Save Folder avec Firefox 19+
-! Correction de la détection des extensions installées.">
+! Correction de la détection des extensions installées.
+! Correction de la Navigation Privée pour Firefox 20.0+
+! Correction du filtrage lorsque le dossier de destination contient des caractères spéciaux pour regexp. (Merci à Ziceptor)
+! Correction de l'enregistrement d'un fichier avec clic-droit pour Firefox 27.0.1+">
<!ENTITY about.version.104 "* Vérification des dossiers proposés sur la fenêtre d'enregistrement afin d'éviter les doublons.
! Correction de l'enregistrement d'un fichier avec simple-clic pour Firefox 7.0.1+ si l'URI du site n'est pas présent dans la base de donnée.">
--
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