From b0215812147dd7ba13d4b2d1098884c8cf9db14c Mon Sep 17 00:00:00 2001 From: bor Date: Thu, 14 Jul 2016 22:49:51 +0430 Subject: [PATCH] bugfix for Auto rule creation of domains with subdomains --- BrowserSelect/Form1.cs | 4 ++-- BrowserSelect/Properties/AssemblyInfo.cs | 4 ++-- README.md | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/BrowserSelect/Form1.cs b/BrowserSelect/Form1.cs index 8876ed9..ce63ab3 100644 --- a/BrowserSelect/Form1.cs +++ b/BrowserSelect/Form1.cs @@ -41,8 +41,8 @@ private void Form1_Load(object sender, EventArgs e) // put the domain name in Always open X in... checkbox rule_url = new Uri(Program.url).Host; var url_parts = rule_url.Split(new[] { '.' }); - if (url_parts.Length > 2 && url_parts[url_parts.Length - 2].Length > 3) - rule_url = url_parts[url_parts.Length - 2] + url_parts[url_parts.Length - 1]; + if (url_parts.Length > 2 && (url_parts[url_parts.Length - 2].Length <= 2 || !((new[] {"org","net","sch","gov"}).Contains(url_parts[url_parts.Length - 2])))) + rule_url = url_parts[url_parts.Length - 2] + "." + url_parts[url_parts.Length - 1]; rule_url = "*." + rule_url; //didn't add this after all... (it was a checkbox for issue #9) diff --git a/BrowserSelect/Properties/AssemblyInfo.cs b/BrowserSelect/Properties/AssemblyInfo.cs index f63e197..d646859 100644 --- a/BrowserSelect/Properties/AssemblyInfo.cs +++ b/BrowserSelect/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.3.0.0")] -[assembly: AssemblyFileVersion("1.3.0.0")] +[assembly: AssemblyVersion("1.3.1.0")] +[assembly: AssemblyFileVersion("1.3.1.0")] diff --git a/README.md b/README.md index c44368f..806c60b 100644 --- a/README.md +++ b/README.md @@ -18,12 +18,15 @@ it has been tested on windows 7, windows 8.1 and windows 10. requires **.net fra # Download -you can download browser select here : [Browser select v1.3 (197KB)](https://github.com/zumoshi/BrowserSelect/releases/download/1.3.0/BrowserSelect.exe) +you can download browser select here : [Browser select v1.3.1 (197KB)](https://github.com/zumoshi/BrowserSelect/releases/download/1.3.1/BrowserSelect.exe) # Changelog +v1.3.1 +- bugfix for Auto rule creation of domains with subdomains + v1.3 - Added an "Always" button under browser icons that adds a rule for *.domain.tld - Added a help button in the main form