1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-25 00:15:48 +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 TweetDuck.Controls;
using TweetDuck.Utils;
@ -6,7 +7,9 @@
namespace TweetDuck.Browser.Handling.General {
sealed class CustomLifeSpanHandler : LifeSpanHandler {
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) {