From 61f06fa27a5d7b8d92b2dcc35488f8c4e27a37c2 Mon Sep 17 00:00:00 2001 From: Moose <124457076+AntlerForce@users.noreply.github.com> Date: Sat, 14 Dec 2024 13:15:14 -0700 Subject: [PATCH] Confirm before opening raw links in chat --- LuaMenu/widgets/api_internet_browser.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/LuaMenu/widgets/api_internet_browser.lua b/LuaMenu/widgets/api_internet_browser.lua index c0f17c4d0..6809f5408 100644 --- a/LuaMenu/widgets/api_internet_browser.lua +++ b/LuaMenu/widgets/api_internet_browser.lua @@ -109,7 +109,11 @@ function BrowserHandler.AddClickableUrls(chatString, onTextClick, textTooltip) endIndex = urlEnd, OnTextClick = { function() - BrowserHandler.OpenUrl(urlString) + local function OpenURL() + Spring.Echo ("Opening URL: " .. urlString) + BrowserHandler.OpenUrl(urlString) + end + WG.Chobby.ConfirmationPopup(OpenURL, "Open URL: " .. " \n" .. " \n" .. urlString, nil, 615, 250, "Open", "Cancel") end } }