Skip to content

Commit

Permalink
Finish up
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenChrysus committed Apr 9, 2021
1 parent 161eefa commit aa83f62
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions OverlayPlugin.Core/Controls/WSConfigPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ private void cbOverlay_SelectedIndexChanged(object sender, EventArgs e)
#endif

var url = preset.Url.Replace("\\", "/").Replace("%%", resourcesPath);
Uri uri = new UriBuilder(url);
UriBuilder uri = new UriBuilder(url);
NameValueCollection query_params = HttpUtility.ParseQueryString(uri.Query);

if (preset.Supports.Contains("modern"))
Expand All @@ -384,7 +384,11 @@ private void cbOverlay_SelectedIndexChanged(object sender, EventArgs e)
}

uri.Query = HttpUtility.UrlDecode(query_params.ToString());
uri.Port = -1;

if (uri.Port == 443 || uri.Port == 80)
{
uri.Port = -1;
}

txtOverlayUrl.Text = (url != "") ? uri.ToString() : url;
}
Expand Down

0 comments on commit aa83f62

Please sign in to comment.