[Pkg-mozext-commits] [automatic-save-folder] 66/133: Fix : Correct the regular expression checkbox behavior when adding the slashes to an already slashed string.

David Prévot taffit at moszumanska.debian.org
Mon Apr 27 20:33:53 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 30448b2db9c48ead1a88c2d32abbfa954b9e2f8e
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date:   Tue Feb 23 22:03:40 2010 +0000

    Fix : Correct the regular expression checkbox behavior when adding the slashes to an already slashed string.
    
    git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@72 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
 content/asf_addedit.js | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/content/asf_addedit.js b/content/asf_addedit.js
index 23b9c2e..bd2f7fe 100644
--- a/content/asf_addedit.js
+++ b/content/asf_addedit.js
@@ -245,23 +245,17 @@ Copyright (C) 2007-2010 Éric Cassar (Cyan).
 		
 		if (document.getElementById(id_regexp).checked) 
 		{
-			if (filter.value.substring(0,1) != "/")  // let's add the /
+			if ((filter.value.substring(0,1) != "/") || (filter.value.substr(filter.value.length - 1, 1) != "/"))  // let's add the /
 			{
 				filter.value = "/" + filter.value;
-			}
-			if (filter.value.substr(filter.value.length - 1, 1) != "/")
-			{
 				filter.value = filter.value + "/";
 			}
 		}
 		else 
 		{
-			if (filter.value.substring(0,1) == "/")  // then delete the /
+			if ((filter.value.substring(0,1) == "/") && (filter.value.substr(filter.value.length - 1, 1) == "/"))  // then delete the /
 			{
 				filter.value = filter.value.substring(1, filter.value.length);
-			}
-			if (filter.value.substr(filter.value.length - 1, 1) == "/")	
-			{
 				filter.value = filter.value.substring(0, filter.value.length -1);
 			}
 		}

-- 
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