Add /openurl command (#2926)

Usage: `/openurl <URL>`. Opens the provided URL in the browser.

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Tal Neoran
2021-06-27 14:40:44 +03:00
committed by GitHub
parent c722f085d0
commit 991892ee76
4 changed files with 41 additions and 3 deletions
+4 -2
View File
@@ -84,12 +84,14 @@ bool supportsIncognitoLinks()
#endif
}
void openLinkIncognito(const QString &link)
bool openLinkIncognito(const QString &link)
{
#ifdef Q_OS_WIN
auto command = getCommand(link);
QProcess::startDetached(command);
return QProcess::startDetached(command);
#else
return false;
#endif
}
+1 -1
View File
@@ -5,6 +5,6 @@
namespace chatterino {
bool supportsIncognitoLinks();
void openLinkIncognito(const QString &link);
bool openLinkIncognito(const QString &link);
} // namespace chatterino