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

Make links open in the user's browser instead of a new window

This commit is contained in:
chylex 2016-04-11 14:58:48 +02:00
parent 7db3c4fcba
commit 939fef42d6
2 changed files with 16 additions and 2 deletions
Core/Handling
Resources

View File

@ -1,4 +1,6 @@
namespace TweetDick.Core.Handling{
using System.Diagnostics;
namespace TweetDick.Core.Handling{
class TweetDeckBridge{
private readonly FormBrowser form;
@ -30,8 +32,12 @@ public void OnTweetPopup(string tweetHtml, int tweetCharacters){
});
}
public void OpenBrowser(string url){
Process.Start(url);
}
public void Log(string data){
System.Diagnostics.Debug.WriteLine(data);
Debug.WriteLine(data);
}
}
}

View File

@ -175,4 +175,12 @@
});
$TD.loadNotificationHeadContents(getNotificationHeadContents());
//
// Block:
//
$(document.body).delegate("a[target='_blank']","click",function(e){
$TD.openBrowser($(this).attr("href"));
e.preventDefault();
});
})($,$TD);