diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index f87ca3969..c5a5231c0 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -213,6 +213,9 @@ namespace Flow.Launcher.Plugin
/// Extra FileName Info
public void OpenDirectory(string DirectoryPath, string FileName = null);
- public void OpenUrl(string url);
+ ///
+ /// Open Url in the configured default browser for Flow's Settings.
+ ///
+ public void OpenUrl(string url, bool? inPrivate = null);
}
}
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index 46f192a91..f54bc23f0 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -114,7 +114,7 @@ namespace Flow.Launcher
var startInfo = ShellCommand.SetProcessStartInfo(filename, arguments: args, createNoWindow: true);
ShellCommand.Execute(startInfo);
}
-
+
public void CopyToClipboard(string text)
{
Clipboard.SetDataObject(text);
@@ -209,7 +209,7 @@ namespace Flow.Launcher
explorer.Start();
}
- public void OpenUrl(string url)
+ public void OpenUrl(string url, bool? inPrivate = null)
{
var browserInfo = _settingsVM.Settings.CustomBrowser;
@@ -217,10 +217,11 @@ namespace Flow.Launcher
if (browserInfo.OpenInTab)
{
- url.OpenInBrowserTab(path, browserInfo.EnablePrivate, browserInfo.PrivateArg);
- }else
+ url.OpenInBrowserTab(path, inPrivate ?? browserInfo.EnablePrivate, browserInfo.PrivateArg);
+ }
+ else
{
- url.OpenInBrowserWindow(path, browserInfo.EnablePrivate, browserInfo.PrivateArg);
+ url.OpenInBrowserWindow(path, inPrivate ?? browserInfo.EnablePrivate, browserInfo.PrivateArg);
}
}