mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-25 17:34:06 +02:00
Apply default background color only to Twitter and TweetDeck websites
This commit is contained in:
parent
ccb87351c1
commit
7de0c50387
@ -76,8 +76,6 @@ public TweetDeckBrowser(FormBrowser owner, PluginManager plugins, TweetDeckBridg
|
|||||||
this.browser.RegisterJsBridge("$TD", tdBridge);
|
this.browser.RegisterJsBridge("$TD", tdBridge);
|
||||||
this.browser.RegisterJsBridge("$TDU", updateBridge);
|
this.browser.RegisterJsBridge("$TDU", updateBridge);
|
||||||
|
|
||||||
// ReSharper disable once PossiblyImpureMethodCallOnReadonlyVariable
|
|
||||||
this.browser.BrowserSettings.BackgroundColor = (uint) TwitterUtils.BackgroundColor.ToArgb();
|
|
||||||
this.browser.Dock = DockStyle.None;
|
this.browser.Dock = DockStyle.None;
|
||||||
this.browser.Location = ControlExtensions.InvisibleLocation;
|
this.browser.Location = ControlExtensions.InvisibleLocation;
|
||||||
this.browser.SetupZoomEvents();
|
this.browser.SetupZoomEvents();
|
||||||
@ -135,7 +133,7 @@ private void browser_FrameLoadStart(object sender, FrameLoadStartEventArgs e) {
|
|||||||
if (frame.IsMain) {
|
if (frame.IsMain) {
|
||||||
string url = frame.Url;
|
string url = frame.Url;
|
||||||
|
|
||||||
if (!TwitterUrls.IsTwitterLogin2Factor(url)) {
|
if (TwitterUrls.IsTweetDeck(url) || (TwitterUrls.IsTwitter(url) && !TwitterUrls.IsTwitterLogin2Factor(url))) {
|
||||||
frame.ExecuteJavaScriptAsync(TwitterUtils.BackgroundColorOverride);
|
frame.ExecuteJavaScriptAsync(TwitterUtils.BackgroundColorOverride);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user