mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-29 11:34:13 +02:00
Add GetHandlerFactory extension method to BrowserUtils
This commit is contained in:
parent
8fcec7ec7c
commit
2f61de7025
Core
@ -139,8 +139,7 @@ protected FormNotificationBase(FormBrowser owner, bool enableContextMenu){
|
|||||||
|
|
||||||
DpiScale = this.GetDPIScale();
|
DpiScale = this.GetDPIScale();
|
||||||
|
|
||||||
DefaultResourceHandlerFactory handlerFactory = (DefaultResourceHandlerFactory)browser.ResourceHandlerFactory;
|
browser.GetHandlerFactory().RegisterHandler(TwitterUtils.TweetDeckURL, this.resourceHandler);
|
||||||
handlerFactory.RegisterHandler(TwitterUtils.TweetDeckURL, this.resourceHandler);
|
|
||||||
|
|
||||||
Controls.Add(browser);
|
Controls.Add(browser);
|
||||||
|
|
||||||
|
@ -35,6 +35,10 @@ public static ChromiumWebBrowser AsControl(this IWebBrowser browserControl){
|
|||||||
return (ChromiumWebBrowser)browserControl;
|
return (ChromiumWebBrowser)browserControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static DefaultResourceHandlerFactory GetHandlerFactory(this ChromiumWebBrowser browser){
|
||||||
|
return (DefaultResourceHandlerFactory)browser.ResourceHandlerFactory;
|
||||||
|
}
|
||||||
|
|
||||||
private const string TwitterTrackingUrl = "t.co";
|
private const string TwitterTrackingUrl = "t.co";
|
||||||
|
|
||||||
public enum UrlCheckResult{
|
public enum UrlCheckResult{
|
||||||
|
Loading…
Reference in New Issue
Block a user