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

Add an option to ignore tracking URL warnings (t.co)

This commit is contained in:
chylex 2018-01-28 19:38:40 +01:00
parent 00b212944c
commit b81c26f93f
2 changed files with 22 additions and 4 deletions
Configuration
Core/Utils

View File

@ -51,9 +51,10 @@ static UserConfig(){
public bool BestImageQuality { get; set; } = true;
public bool EnableAnimatedImages { get; set; } = true;
public bool EnableSmoothScrolling { get; set; } = true;
public string BrowserPath { get; set; } = null;
private int _zoomLevel = 100;
public bool IgnoreTrackingUrlWarning { get; set; } = false;
public bool EnableSmoothScrolling { get; set; } = true;
public string BrowserPath { get; set; } = null;
private int _zoomLevel = 100;
private bool _muteNotifications;
public int VideoPlayerVolume { get; set; } = 50;

View File

@ -93,10 +93,27 @@ public static void OpenExternalBrowser(string url){
break;
case UrlCheckResult.Tracking:
if (FormMessage.Warning("Blocked URL", "TweetDuck has blocked a tracking url due to privacy concerns. Do you want to visit it anyway?\n"+url, FormMessage.Yes, FormMessage.No)){
if (Program.UserConfig.IgnoreTrackingUrlWarning){
goto case UrlCheckResult.Fine;
}
using(FormMessage form = new FormMessage("Blocked URL", "TweetDuck has blocked a tracking url due to privacy concerns. Do you want to visit it anyway?\n"+url, MessageBoxIcon.Warning)){
form.AddButton(FormMessage.No, DialogResult.No, ControlType.Cancel | ControlType.Focused);
form.AddButton(FormMessage.Yes, DialogResult.Yes, ControlType.Accept);
form.AddButton("Always Visit", DialogResult.Ignore);
DialogResult result = form.ShowDialog();
if (result == DialogResult.Ignore){
Program.UserConfig.IgnoreTrackingUrlWarning = true;
Program.UserConfig.Save();
}
if (result == DialogResult.Ignore || result == DialogResult.Yes){
goto case UrlCheckResult.Fine;
}
}
break;
case UrlCheckResult.Invalid: