1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-05 02:34:07 +02:00

Fix popups for Google & Apple sign-in

This commit is contained in:
chylex 2022-01-01 19:53:36 +01:00
parent 5f60852fbb
commit 115428ec50
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548

View File

@ -1,4 +1,5 @@
using CefSharp; using System;
using CefSharp;
using CefSharp.Handler; using CefSharp.Handler;
using TweetDuck.Controls; using TweetDuck.Controls;
using TweetDuck.Utils; using TweetDuck.Utils;
@ -6,7 +7,9 @@
namespace TweetDuck.Browser.Handling.General { namespace TweetDuck.Browser.Handling.General {
sealed class CustomLifeSpanHandler : LifeSpanHandler { sealed class CustomLifeSpanHandler : LifeSpanHandler {
private static bool IsPopupAllowed(string url) { private static bool IsPopupAllowed(string url) {
return url.StartsWith("https://twitter.com/teams/authorize?"); return url.StartsWith("https://twitter.com/teams/authorize?", StringComparison.Ordinal) ||
url.StartsWith("https://accounts.google.com/", StringComparison.Ordinal) ||
url.StartsWith("https://appleid.apple.com/", StringComparison.Ordinal);
} }
public static bool HandleLinkClick(IWebBrowser browserControl, WindowOpenDisposition targetDisposition, string targetUrl) { public static bool HandleLinkClick(IWebBrowser browserControl, WindowOpenDisposition targetDisposition, string targetUrl) {