From 797fab8a2553866650c71c5953b979e3b33ad7b6 Mon Sep 17 00:00:00 2001 From: Petr Stodulka Date: Thu, 4 Jun 2020 12:02:48 +0200 Subject: [PATCH 1/2] Adding URI Query to the string matched against a regex pattern. --- DanTup.BrowserSelector/Program.cs | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DanTup.BrowserSelector/Program.cs b/DanTup.BrowserSelector/Program.cs index cad10b1..ed16c41 100644 --- a/DanTup.BrowserSelector/Program.cs +++ b/DanTup.BrowserSelector/Program.cs @@ -230,7 +230,7 @@ static void LaunchBrowser(string url, bool waitForClose = false) if (urlPattern.StartsWith("/") && urlPattern.EndsWith("/")) { // The domain from the INI file is a regex.. - domain = uri.Authority + uri.AbsolutePath; + domain = uri.Authority + uri.PathAndQuery; pattern = urlPattern.Substring(1, urlPattern.Length - 2); } else diff --git a/README.md b/README.md index 3493ed1..acd3f62 100644 --- a/README.md +++ b/README.md @@ -121,5 +121,5 @@ There are two ways to specify an Url. You can use simple wildcards or full regul ``` - Full regular expressions are specified by wrapping it in /'s. -- The domain _and_ path are used in the Url comparison. +- The domain _and_ path _and_ query are used in the Url comparison. - The regular expression syntax is based on the Microsoft .NET implementation. From 0db922641d23012d831d21e3db866cccdf18dff2 Mon Sep 17 00:00:00 2001 From: Petr Stodulka Date: Thu, 4 Jun 2020 12:22:49 +0200 Subject: [PATCH 2/2] Adapted readme with information specific to the forked repository. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index acd3f62..5d9580d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -> NOTE: This software is not being actively developed or maintained. +> NOTE: This is a clone of [DanTup/BrowserSelector](https://github.com/DanTup/BrowserSelector) enhanced by comparing the full URI (including query part) against a regex pattern. -# Browser Selector [![Build status](https://ci.appveyor.com/api/projects/status/github/DanTup/BrowserSelector?svg=true)](https://ci.appveyor.com/project/DanTup/browserselector) +# Browser Selector [![Build status](https://ci.appveyor.com/api/projects/status/github/pstodulka/BrowserSelector?svg=true)](https://ci.appveyor.com/project/pstodulka/browserselector) Small utility to launch a different browser depending on the domain of the url being launched. @@ -8,7 +8,7 @@ Small utility to launch a different browser depending on the domain of the url b ## Setting Up -1. Grab the [latest release](https://github.com/DanTup/BrowserSelector/releases) and extract to a folder somewhere on your PC. +1. Grab the [latest release](https://github.com/pstodulka/BrowserSelector/releases) and extract to a folder somewhere on your PC. 2. Open the BrowserSelector.ini file and customise paths to your browsers and domain patterns (see below). 3. Run `BrowserSelector.exe --register` from this folder to register the tool in Windows as a web browser. 4. Open the "Choose a default browser" screen in Windows (you can simply search for "default browser" from the start screen).