Skip to content

Commit

Permalink
Use pacScript if possible to avoid downloading pacUrl again.
Browse files Browse the repository at this point in the history
  • Loading branch information
FelisCatus committed Dec 6, 2014
1 parent 7fb69c7 commit 34f1889
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions omega-target-chromium-extension/src/options.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,14 @@ class ChromeOptions extends OmegaTarget.Options
config['mode'] = 'direct'
else if profile.profileType == 'PacProfile'
config['mode'] = 'pac_script'
config['pacScript'] = if profile.pacUrl
url: profile.pacUrl
mandatory: true
else
data: profile.pacScript
mandatory: true

config['pacScript'] =
if !profile.pacScript || OmegaPac.Profiles.isFileUrl(profile.pacUrl)
url: profile.pacUrl
mandatory: true
else
data: profile.pacScript
mandatory: true
else if profile.profileType == 'FixedProfile'
config = @_fixedProfileConfig(profile)
else
Expand Down

0 comments on commit 34f1889

Please sign in to comment.