Use pacScript if possible to avoid downloading pacUrl again.

This commit is contained in:
FelisCatus 2014-12-06 20:39:19 +08:00
parent 7fb69c7cda
commit 34f18891ef

View File

@ -126,12 +126,14 @@ class ChromeOptions extends OmegaTarget.Options
config['mode'] = 'direct' config['mode'] = 'direct'
else if profile.profileType == 'PacProfile' else if profile.profileType == 'PacProfile'
config['mode'] = 'pac_script' config['mode'] = 'pac_script'
config['pacScript'] = if profile.pacUrl
url: profile.pacUrl config['pacScript'] =
mandatory: true if !profile.pacScript || OmegaPac.Profiles.isFileUrl(profile.pacUrl)
else url: profile.pacUrl
data: profile.pacScript mandatory: true
mandatory: true else
data: profile.pacScript
mandatory: true
else if profile.profileType == 'FixedProfile' else if profile.profileType == 'FixedProfile'
config = @_fixedProfileConfig(profile) config = @_fixedProfileConfig(profile)
else else