Skip to content

Commit

Permalink
Upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
hellzerg committed Nov 12, 2022
1 parent 384859b commit 28cbccc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions Optimizer/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2515,24 +2515,9 @@ private void button47_Click(object sender, EventArgs e)
{
string ip = txtIP.Text.Trim();
string domain = txtDomain.Text.Trim();
string recommendedDomain = string.Empty;

if (!domain.StartsWith("www."))
{
recommendedDomain = "www." + domain;
}
else
{
recommendedDomain = domain.Replace("www.", string.Empty);
}

HostsHelper.AddEntry(HostsHelper.SanitizeEntry(ip) + " " + HostsHelper.SanitizeEntry(domain));

if (!string.IsNullOrEmpty(recommendedDomain))
{
HostsHelper.AddEntry(HostsHelper.SanitizeEntry(ip) + " " + HostsHelper.SanitizeEntry(recommendedDomain));
}

GetHostsEntries();

txtIP.Clear();
Expand Down
2 changes: 1 addition & 1 deletion Optimizer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static void Main(string[] switches)
Environment.Exit(0);
}

// resets configuration
// repairs corrupted configuration
if (arg == "/reset")
{
Utilities.Repair(true);
Expand Down

0 comments on commit 28cbccc

Please sign in to comment.