mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-04 08:34:07 +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("$TDU", updateBridge);
|
||||
|
||||
// ReSharper disable once PossiblyImpureMethodCallOnReadonlyVariable
|
||||
this.browser.BrowserSettings.BackgroundColor = (uint) TwitterUtils.BackgroundColor.ToArgb();
|
||||
this.browser.Dock = DockStyle.None;
|
||||
this.browser.Location = ControlExtensions.InvisibleLocation;
|
||||
this.browser.SetupZoomEvents();
|
||||
@ -135,7 +133,7 @@ private void browser_FrameLoadStart(object sender, FrameLoadStartEventArgs e) {
|
||||
if (frame.IsMain) {
|
||||
string url = frame.Url;
|
||||
|
||||
if (!TwitterUrls.IsTwitterLogin2Factor(url)) {
|
||||
if (TwitterUrls.IsTweetDeck(url) || (TwitterUrls.IsTwitter(url) && !TwitterUrls.IsTwitterLogin2Factor(url))) {
|
||||
frame.ExecuteJavaScriptAsync(TwitterUtils.BackgroundColorOverride);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user