mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-09-14 10:32:10 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
e9b2fa7603 | |||
35afaa105d | |||
2e300a7b8f | |||
f3f5b88550 |
@@ -139,7 +139,7 @@ namespace TweetDuck.Core.Notification{
|
|||||||
|
|
||||||
DpiScale = this.GetDPIScale();
|
DpiScale = this.GetDPIScale();
|
||||||
|
|
||||||
browser.GetHandlerFactory().RegisterHandler(TwitterUtils.TweetDeckURL, this.resourceHandler);
|
browser.SetupResourceHandler(TwitterUtils.TweetDeckURL, this.resourceHandler);
|
||||||
|
|
||||||
Controls.Add(browser);
|
Controls.Add(browser);
|
||||||
|
|
||||||
|
@@ -61,6 +61,7 @@
|
|||||||
this.labelDataCollectionLink.TabIndex = 1;
|
this.labelDataCollectionLink.TabIndex = 1;
|
||||||
this.labelDataCollectionLink.TabStop = true;
|
this.labelDataCollectionLink.TabStop = true;
|
||||||
this.labelDataCollectionLink.Text = "(learn more)";
|
this.labelDataCollectionLink.Text = "(learn more)";
|
||||||
|
this.labelDataCollectionLink.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
this.labelDataCollectionLink.UseCompatibleTextRendering = true;
|
this.labelDataCollectionLink.UseCompatibleTextRendering = true;
|
||||||
//
|
//
|
||||||
// checkDataCollection
|
// checkDataCollection
|
||||||
|
@@ -178,16 +178,7 @@ namespace TweetDuck.Core{
|
|||||||
bool hasCustomSound = Program.UserConfig.IsCustomSoundNotificationSet;
|
bool hasCustomSound = Program.UserConfig.IsCustomSoundNotificationSet;
|
||||||
|
|
||||||
if (prevSoundNotificationPath != Program.UserConfig.NotificationSoundPath){
|
if (prevSoundNotificationPath != Program.UserConfig.NotificationSoundPath){
|
||||||
DefaultResourceHandlerFactory handlerFactory = browser.GetHandlerFactory();
|
browser.SetupResourceHandler(soundUrl, hasCustomSound ? SoundNotification.CreateFileHandler(Program.UserConfig.NotificationSoundPath) : null);
|
||||||
IResourceHandler resourceHandler = hasCustomSound ? SoundNotification.CreateFileHandler(Program.UserConfig.NotificationSoundPath) : null;
|
|
||||||
|
|
||||||
if (resourceHandler != null){
|
|
||||||
handlerFactory.RegisterHandler(soundUrl, resourceHandler);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
handlerFactory.UnregisterHandler(soundUrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
prevSoundNotificationPath = Program.UserConfig.NotificationSoundPath;
|
prevSoundNotificationPath = Program.UserConfig.NotificationSoundPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -38,8 +38,15 @@ namespace TweetDuck.Core.Utils{
|
|||||||
return (ChromiumWebBrowser)browserControl;
|
return (ChromiumWebBrowser)browserControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DefaultResourceHandlerFactory GetHandlerFactory(this ChromiumWebBrowser browser){
|
public static void SetupResourceHandler(this ChromiumWebBrowser browser, string url, IResourceHandler handler){
|
||||||
return (DefaultResourceHandlerFactory)browser.ResourceHandlerFactory;
|
DefaultResourceHandlerFactory factory = (DefaultResourceHandlerFactory)browser.ResourceHandlerFactory;
|
||||||
|
|
||||||
|
if (handler == null){
|
||||||
|
factory.UnregisterHandler(url);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
factory.RegisterHandler(url, handler);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private const string TwitterTrackingUrl = "t.co";
|
private const string TwitterTrackingUrl = "t.co";
|
||||||
|
@@ -20,7 +20,7 @@ namespace TweetDuck{
|
|||||||
public const string BrandName = "TweetDuck";
|
public const string BrandName = "TweetDuck";
|
||||||
public const string Website = "https://tweetduck.chylex.com";
|
public const string Website = "https://tweetduck.chylex.com";
|
||||||
|
|
||||||
public const string VersionTag = "1.12.3";
|
public const string VersionTag = "1.12.3.1";
|
||||||
|
|
||||||
public static readonly bool IsPortable = File.Exists("makeportable");
|
public static readonly bool IsPortable = File.Exists("makeportable");
|
||||||
|
|
||||||
|
@@ -280,7 +280,7 @@
|
|||||||
"<html "+Array.prototype.map.call(document.documentElement.attributes, ele => `${ele.name}="${ele.value}"`).join(" ")+"><head>"
|
"<html "+Array.prototype.map.call(document.documentElement.attributes, ele => `${ele.name}="${ele.value}"`).join(" ")+"><head>"
|
||||||
];
|
];
|
||||||
|
|
||||||
$(document.head).children("link[href*='css/font.']:first,link[href*='css/app-"+themeName+".']:first,meta[charset],meta[http-equiv]").each(function(){
|
$(document.head).children("link[rel='stylesheet'],meta[charset]").each(function(){
|
||||||
tags.push($(this)[0].outerHTML);
|
tags.push($(this)[0].outerHTML);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user