1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-07 17:34:06 +02:00

Add a IsTweetDeckWebsite bool to ITweetDeckBrowser

This commit is contained in:
chylex 2018-02-28 07:24:40 +01:00
parent 8134843dad
commit 833e42f455
3 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,8 @@
namespace TweetDuck.Core{
interface ITweetDeckBrowser{
bool IsTweetDeckWebsite { get; }
void RegisterBridge(string name, object obj);
void OnFrameLoaded(Action<IFrame> callback);
void ExecuteFunction(string name, params object[] args);

View File

@ -92,6 +92,10 @@ protected FormNotificationMain(FormBrowser owner, PluginManager pluginManager, b
Disposed += (sender, args) => StopMouseHook(true);
}
// implementation of ITweetDeckBrowser
bool ITweetDeckBrowser.IsTweetDeckWebsite => IsNotificationVisible;
void ITweetDeckBrowser.RegisterBridge(string name, object obj){
browser.RegisterAsyncJsObject(name, obj);
}

View File

@ -22,6 +22,10 @@ public bool Enabled{
public bool IsTweetDeckWebsite{
get{
if (!Ready){
return false;
}
using(IFrame frame = browser.GetBrowser().MainFrame){
return TwitterUtils.IsTweetDeckWebsite(frame);
}