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

Fix a recently introduced bug that broke the forward mouse button on DMs

This commit is contained in:
chylex 2017-04-02 18:51:33 +02:00
parent dbfebf6a32
commit fa234eb9d6

View File

@ -257,17 +257,22 @@
if (e.type === "mouseenter"){ if (e.type === "mouseenter"){
var me = $(this); var me = $(this);
if (!me[0].hasAttribute("data-tweet-id") || !highlightedColumnObj && !updateHighlightedColumn(me.closest("section.js-column"))){ if (!me[0].hasAttribute("data-account-key") || (!highlightedColumnObj && !updateHighlightedColumn(me.closest("section.js-column")))){
return; return;
} }
var tweet = highlightedColumnObj.findChirp(me.attr("data-tweet-id")) || highlightedColumnObj.findChirp(me.attr("data-key")); var tweet = highlightedColumnObj.findChirp(me.attr("data-tweet-id")) || highlightedColumnObj.findChirp(me.attr("data-key"));
if (tweet){
if (tweet.chirpType === TD.services.ChirpBase.TWEET){
var link = tweet.getChirpURL();
var embedded = tweet.quotedTweet ? tweet.quotedTweet.getChirpURL() : "";
if (tweet && tweet.chirpType === TD.services.ChirpBase.TWEET){ updateHighlightedTweet(me, tweet, link || "", embedded || "");
var link = tweet.getChirpURL(); }
var embedded = tweet.quotedTweet ? tweet.quotedTweet.getChirpURL() : ""; else{
updateHighlightedTweet(me, tweet, "", "");
updateHighlightedTweet(me, tweet, link || "", embedded || ""); }
} }
} }
else if (e.type === "mouseleave"){ else if (e.type === "mouseleave"){