Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions BrowseRouter/Config/UrlPreferenceExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static (string, string) GetDomainAndPattern(this UrlPreference pref, Uri

if (urlPattern.StartsWith('/') && urlPattern.EndsWith('/'))
{
// The domain from the INI file is a regex
// The domain from config is a regex
string domain = uri.Authority + uri.AbsolutePath;
string pattern = urlPattern.Substring(1, urlPattern.Length - 2);

Expand All @@ -30,7 +30,7 @@ public static (string, string) GetDomainAndPattern(this UrlPreference pref, Uri

if (urlPattern.StartsWith('?') && urlPattern.EndsWith('?'))
{
// The domain from the INI file is a query filter
// The domain from config is a query filter
string domain = uri.Authority + uri.PathAndQuery;
string pattern = urlPattern.Substring(1, urlPattern.Length - 2);

Expand Down Expand Up @@ -74,7 +74,7 @@ public static (string, string) GetDomainAndPattern(this UrlPreference pref, stri

if (urlPattern.StartsWith('/') && urlPattern.EndsWith('/'))
{
// The window title from the INI file is a regex
// The window title from config is a regex
string pattern = urlPattern.Substring(1, urlPattern.Length - 2);

return (windowTitle, pattern);
Expand Down
9 changes: 0 additions & 9 deletions BrowseRouter/Model/Args.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ public static (string, string) SplitPathAndArgs(string s)
return (path, args);
}

// If not quoted, split on first space to separate path from args
int spaceIndex = s.IndexOf(' ');
if (spaceIndex > 0)
{
string path = s[..spaceIndex];
string args = s[(spaceIndex + 1)..];
return (path, args);
}

// The single executable without any other arguments.
return (s, "");
}
Expand Down
4 changes: 4 additions & 0 deletions BrowseRouter/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
"open multiple URLs": {
"commandName": "Project",
"commandLineArgs": "example.org example.com"
},
"firefox container": {
"commandName": "Project",
"commandLineArgs": "https://www.work.test/foobar"
}
}
}
4 changes: 3 additions & 1 deletion BrowseRouter/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
"urls": {
"*google.com": "chrome",
"*microsoft.com": "edge",
"*mozilla.org": "ff"
"*mozilla.org": "ff",
"*work.test*" : "ff-work"
},
"browsers": {
"edge": "%ProgramFiles(x86)%\\Microsoft\\Edge\\Application\\msedge.exe",
"opera": "%UserProfile%\\AppData\\Local\\Programs\\Opera\\opera.exe",
"ff": "%ProgramFiles%\\Mozilla Firefox\\firefox.exe",
"ff-work": "\"%ProgramFiles%\\Mozilla Firefox\\firefox.exe\" ext+container:name=Work&url={url}",
"chrome": "%ProgramFiles%\\Google\\Chrome\\Application\\chrome.exe"
},
"sources": {
Expand Down
Loading