1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-22 00:15:48 +02:00

Add GetHandlerFactory extension method to BrowserUtils

This commit is contained in:
chylex 2018-01-13 22:37:24 +01:00
parent 8fcec7ec7c
commit 2f61de7025
2 changed files with 5 additions and 2 deletions

View File

@ -139,8 +139,7 @@ protected FormNotificationBase(FormBrowser owner, bool enableContextMenu){
DpiScale = this.GetDPIScale();
DefaultResourceHandlerFactory handlerFactory = (DefaultResourceHandlerFactory)browser.ResourceHandlerFactory;
handlerFactory.RegisterHandler(TwitterUtils.TweetDeckURL, this.resourceHandler);
browser.GetHandlerFactory().RegisterHandler(TwitterUtils.TweetDeckURL, this.resourceHandler);
Controls.Add(browser);

View File

@ -35,6 +35,10 @@ public static ChromiumWebBrowser AsControl(this IWebBrowser browserControl){
return (ChromiumWebBrowser)browserControl;
}
public static DefaultResourceHandlerFactory GetHandlerFactory(this ChromiumWebBrowser browser){
return (DefaultResourceHandlerFactory)browser.ResourceHandlerFactory;
}
private const string TwitterTrackingUrl = "t.co";
public enum UrlCheckResult{