diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index cb60251ed..e89839131 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -305,6 +305,19 @@ namespace Flow.Launcher.Plugin
/// Extra FileName Info
public void OpenDirectory(string DirectoryPath, string FileNameOrFilePath = null);
+ ///
+ /// Opens the URL using the browser with the given Uri object, even if the URL is a local file.
+ /// The browser and mode used is based on what's configured in Flow's default browser settings.
+ ///
+ public void OpenWebUrl(Uri url, bool? inPrivate = null, bool forceBrower = false);
+
+ ///
+ /// Opens the URL using the browser with the given string, even if the URL is a local file.
+ /// The browser and mode used is based on what's configured in Flow's default browser settings.
+ /// Non-C# plugins should use this method.
+ ///
+ public void OpenWebUrl(string url, bool? inPrivate = null, bool forceBrower = false);
+
///
/// Opens the URL with the given Uri object.
/// The browser and mode used is based on what's configured in Flow's default browser settings.
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index c06c56039..b238a899d 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -391,9 +391,9 @@ namespace Flow.Launcher
}
- private void OpenUri(Uri uri, bool? inPrivate = null)
+ private void OpenUri(Uri uri, bool? inPrivate = null, bool forceBrower = false)
{
- if (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps)
+ if (forceBrower || uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps)
{
var browserInfo = _settings.CustomBrowser;
@@ -420,6 +420,16 @@ namespace Flow.Launcher
}
}
+ public void OpenUrl(string url, bool? inPrivate = null, bool forceBrower = false)
+ {
+ OpenUri(new Uri(url), inPrivate, forceBrower);
+ }
+
+ public void OpenUrl(Uri url, bool? inPrivate = null, bool forceBrower = false)
+ {
+ OpenUri(url, inPrivate, forceBrower);
+ }
+
public void OpenUrl(string url, bool? inPrivate = null)
{
OpenUri(new Uri(url), inPrivate);