From 6f19edf7e92c170298753f5265b9c04ab5e0f130 Mon Sep 17 00:00:00 2001 From: ASpoonPlaysGames <66967891+ASpoonPlaysGames@users.noreply.github.com> Date: Sat, 2 Mar 2024 10:51:01 +0000 Subject: [PATCH 1/2] check OpenExternalWebBrowser custom flag properly --- primedev/scripts/client/scriptbrowserhooks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primedev/scripts/client/scriptbrowserhooks.cpp b/primedev/scripts/client/scriptbrowserhooks.cpp index 86b4a356a..79d04c6d4 100644 --- a/primedev/scripts/client/scriptbrowserhooks.cpp +++ b/primedev/scripts/client/scriptbrowserhooks.cpp @@ -9,7 +9,7 @@ void, __fastcall, (char* pUrl, char flags)) // clang-format on { bool bIsOriginOverlayEnabledOriginal = *bIsOriginOverlayEnabled; - if (flags & 2 && !strncmp(pUrl, "http", 4)) // custom force external browser flag + if (flags & 2 && !strncmp(pUrl, "http://", 7)) // custom force external browser flag *bIsOriginOverlayEnabled = false; // if this bool is false, game will use an external browser rather than the origin overlay one OpenExternalWebBrowser(pUrl, flags); From 94c895b890254a3154bdc867f672ab2a0d4c26e8 Mon Sep 17 00:00:00 2001 From: ASpoonPlaysGames <66967891+ASpoonPlaysGames@users.noreply.github.com> Date: Sat, 2 Mar 2024 10:55:24 +0000 Subject: [PATCH 2/2] allow https --- primedev/scripts/client/scriptbrowserhooks.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/primedev/scripts/client/scriptbrowserhooks.cpp b/primedev/scripts/client/scriptbrowserhooks.cpp index 79d04c6d4..dcf051d22 100644 --- a/primedev/scripts/client/scriptbrowserhooks.cpp +++ b/primedev/scripts/client/scriptbrowserhooks.cpp @@ -9,7 +9,8 @@ void, __fastcall, (char* pUrl, char flags)) // clang-format on { bool bIsOriginOverlayEnabledOriginal = *bIsOriginOverlayEnabled; - if (flags & 2 && !strncmp(pUrl, "http://", 7)) // custom force external browser flag + bool isHttp = !strncmp(pUrl, "http://", 7) || !strncmp(pUrl, "https://", 8); + if (flags & 2 && isHttp) // custom force external browser flag *bIsOriginOverlayEnabled = false; // if this bool is false, game will use an external browser rather than the origin overlay one OpenExternalWebBrowser(pUrl, flags);