From 1de13ac17a6c61dee66773daa5de171ef5345192 Mon Sep 17 00:00:00 2001 From: JinnLynn Date: Wed, 9 May 2012 14:33:53 +0800 Subject: [PATCH] JS Code format; ver updated. --- genpac.py | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/genpac.py b/genpac.py index 73f8a9a6..3c25ffd0 100755 --- a/genpac.py +++ b/genpac.py @@ -39,7 +39,7 @@ # ********************************************************************** # -VERSION = '0.1a' +VERSION = '0.2' # 调试模式 DEBUGMODE = True @@ -228,49 +228,42 @@ def CreatePacFile(gfwlistRules, userRules): var length = 0; length = directUserRegexpList.length; - for (i = 0; i < length; i++) - { + for (i = 0; i < length; i++) { if(regExpMatch(url, directUserRegexpList[i])) return D; } length = directUserWildcardList.length; - for (i = 0; i < length; i++) - { + for (i = 0; i < length; i++) { if (shExpMatch(url, directUserWildcardList[i])) return D; } length = proxyUserRegexpList.length; - for (i = 0; i < length; i++) - { + for (i = 0; i < length; i++) { if(regExpMatch(url, proxyUserRegexpList[i])) return P; } length = proxyUserWildcardList.length; - for (i = 0; i < length; i++) - { + for (i = 0; i < length; i++) { if(shExpMatch(url, proxyUserWildcardList[i])) return P; } + length = directRegexpList.length; - for (i = 0; i < length; i++) - { + for (i = 0; i < length; i++) { if(regExpMatch(url, directRegexpList[i])) return D; } length = directWildcardList.length; - for (i = 0; i < length; i++) - { + for (i = 0; i < length; i++) { if (shExpMatch(url, directWildcardList[i])) return D; } length = proxyRegexpList.length; - for (i = 0; i < length; i++) - { + for (i = 0; i < length; i++) { if(regExpMatch(url, proxyRegexpList[i])) return P; } length = proxyWildcardList.length; - for (i = 0; i < length; i++) - { + for (i = 0; i < length; i++) { if(shExpMatch(url, proxyWildcardList[i])) return P; }