mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-20 12:15:51 +02:00
Implement 'Save all images as...' for images in quoted tweets
This commit is contained in:
parent
4f5075ac54
commit
f0affa4aec
@ -460,6 +460,10 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var processMedia = function(media){
|
||||||
|
return media.filter(item => !item.isAnimatedGif).map(item => item.entity.media_url_https+":small").join(";");
|
||||||
|
};
|
||||||
|
|
||||||
app.delegate("section.js-column", "mouseenter mouseleave", function(e){
|
app.delegate("section.js-column", "mouseenter mouseleave", function(e){
|
||||||
if (e.type === "mouseenter"){
|
if (e.type === "mouseenter"){
|
||||||
if (!highlightedColumnObj){
|
if (!highlightedColumnObj){
|
||||||
@ -483,8 +487,7 @@
|
|||||||
let tweetUrl = tweet.getChirpURL();
|
let tweetUrl = tweet.getChirpURL();
|
||||||
let quoteUrl = tweet.quotedTweet ? tweet.quotedTweet.getChirpURL() : "";
|
let quoteUrl = tweet.quotedTweet ? tweet.quotedTweet.getChirpURL() : "";
|
||||||
let authors = tweet.quotedTweet ? [ tweet.getMainUser().screenName, tweet.quotedTweet.getMainUser().screenName ].join(";") : tweet.getMainUser().screenName;
|
let authors = tweet.quotedTweet ? [ tweet.getMainUser().screenName, tweet.quotedTweet.getMainUser().screenName ].join(";") : tweet.getMainUser().screenName;
|
||||||
let imageList = tweet.hasImage() ? tweet.getMedia().filter(item => !item.isAnimatedGif).map(item => item.entity.media_url_https+":small").join(";") : "";
|
let imageList = tweet.quotedTweet ? processMedia(tweet.quotedTweet.getMedia()) : tweet.hasImage() ? processMedia(tweet.getMedia()) : "";
|
||||||
// TODO maybe handle embedded images too?
|
|
||||||
|
|
||||||
updateHighlightedTweet(me, tweet, tweetUrl || "", quoteUrl || "", authors, imageList);
|
updateHighlightedTweet(me, tweet, tweetUrl || "", quoteUrl || "", authors, imageList);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user