From e5fc045402799e98a2b134cc3be99293f0be17b2 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 24 Feb 2019 01:00:40 -0800 Subject: [PATCH] UI: Force Twitch moderation tools to system browser In the Twitch chat dock window, the "Moderation Tools" link in the chat settings should not navigate the window to the new URL; it should pop up the URL in the user's system browser instead. --- UI/auth-twitch.cpp | 6 ++++++ plugins/obs-browser | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/UI/auth-twitch.cpp b/UI/auth-twitch.cpp index e2c1c18fe..b0e5ab97d 100644 --- a/UI/auth-twitch.cpp +++ b/UI/auth-twitch.cpp @@ -206,6 +206,11 @@ void TwitchAuth::LoadUI() std::string url; std::string script; + std::string moderation_tools_url; + moderation_tools_url = "https://www.twitch.tv/"; + moderation_tools_url += name; + moderation_tools_url += "/dashboard/settings/moderation?no-reload=true"; + /* ----------------------------------- */ url = "https://www.twitch.tv/popout/"; @@ -224,6 +229,7 @@ void TwitchAuth::LoadUI() browser = cef->create_widget(nullptr, url, panel_cookies); chat->SetWidget(browser); + cef->add_force_popup_url(moderation_tools_url, chat.data()); script = bttv_script; script += ffz_script; diff --git a/plugins/obs-browser b/plugins/obs-browser index ba8e36af5..7d0699597 160000 --- a/plugins/obs-browser +++ b/plugins/obs-browser @@ -1 +1 @@ -Subproject commit ba8e36af5cb24b168696c07dd25f6ff487a92a9c +Subproject commit 7d0699597eb89d2031842d87b91424743f3ac503