mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-01 17:48:15 +08:00
feat: twitter showSymbolForRetweetAndReply param
This commit is contained in:
@@ -48,6 +48,7 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => {
|
||||
showQuotedAuthorAvatarInDesc: fallback(params.showQuotedAuthorAvatarInDesc, queryToBoolean(routeParams.get('showQuotedAuthorAvatarInDesc')), false),
|
||||
showAuthorAvatarInDesc: fallback(params.showAuthorAvatarInDesc, queryToBoolean(routeParams.get('showAuthorAvatarInDesc')), false),
|
||||
showEmojiForRetweetAndReply: fallback(params.showEmojiForRetweetAndReply, queryToBoolean(routeParams.get('showEmojiForRetweetAndReply')), false),
|
||||
showSymbolForRetweetAndReply: fallback(params.showSymbolForRetweetAndReply, queryToBoolean(routeParams.get('showSymbolForRetweetAndReply')), true),
|
||||
showRetweetTextInTitle: fallback(params.showRetweetTextInTitle, queryToBoolean(routeParams.get('showRetweetTextInTitle')), true),
|
||||
addLinkForPics: fallback(params.addLinkForPics, queryToBoolean(routeParams.get('addLinkForPics')), false),
|
||||
showTimestampInDescription: fallback(params.showTimestampInDescription, queryToBoolean(routeParams.get('showTimestampInDescription')), false),
|
||||
@@ -69,6 +70,7 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => {
|
||||
showQuotedAuthorAvatarInDesc,
|
||||
showAuthorAvatarInDesc,
|
||||
showEmojiForRetweetAndReply,
|
||||
showSymbolForRetweetAndReply,
|
||||
showRetweetTextInTitle,
|
||||
addLinkForPics,
|
||||
showTimestampInDescription,
|
||||
@@ -228,7 +230,7 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => {
|
||||
}
|
||||
quote += formatMedia(quoteData);
|
||||
picsPrefix += generatePicsPrefix(quoteData);
|
||||
quoteInTitle += showEmojiForRetweetAndReply ? ' 💬 ' : ' RT ';
|
||||
quoteInTitle += showEmojiForRetweetAndReply ? ' 💬 ' : showSymbolForRetweetAndReply ? ' RT ' : '';
|
||||
quoteInTitle += `${author.name}: ${formatText(quoteData.full_text, quoteData.entities.urls)}`;
|
||||
|
||||
if (readable) {
|
||||
@@ -258,15 +260,15 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => {
|
||||
const isQuote = item.is_quote_status;
|
||||
if (!isRetweet && (!isQuote || showRetweetTextInTitle)) {
|
||||
if (item.in_reply_to_screen_name) {
|
||||
title += showEmojiForRetweetAndReply ? '↩️ ' : 'Re ';
|
||||
title += showEmojiForRetweetAndReply ? '↩️ ' : showSymbolForRetweetAndReply ? 'Re ' : '';
|
||||
}
|
||||
title += replaceBreak(originalItem.full_text);
|
||||
}
|
||||
if (isRetweet) {
|
||||
title += showEmojiForRetweetAndReply ? '🔁 ' : 'RT ';
|
||||
title += showEmojiForRetweetAndReply ? '🔁 ' : showSymbolForRetweetAndReply ? 'RT ' : '';
|
||||
title += item.user.name + ': ';
|
||||
if (item.in_reply_to_screen_name) {
|
||||
title += showEmojiForRetweetAndReply ? ' ↩️ ' : ' Re ';
|
||||
title += showEmojiForRetweetAndReply ? ' ↩️ ' : showSymbolForRetweetAndReply ? ' Re ' : '';
|
||||
}
|
||||
title += replaceBreak(item.full_text);
|
||||
}
|
||||
@@ -298,7 +300,7 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => {
|
||||
}
|
||||
description += ' ';
|
||||
}
|
||||
description += showEmojiForRetweetAndReply ? '🔁' : 'RT';
|
||||
description += showEmojiForRetweetAndReply ? '🔁' : showSymbolForRetweetAndReply ? 'RT' : '';
|
||||
if (!showAuthorInDesc) {
|
||||
description += ' ';
|
||||
if (readable) {
|
||||
@@ -341,7 +343,7 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => {
|
||||
description += `: `;
|
||||
}
|
||||
if (item.in_reply_to_screen_name) {
|
||||
description += showEmojiForRetweetAndReply ? '↩️ ' : 'Re ';
|
||||
description += showEmojiForRetweetAndReply ? '↩️ ' : showSymbolForRetweetAndReply ? 'Re ' : '';
|
||||
}
|
||||
|
||||
description += item.full_text;
|
||||
|
||||
Reference in New Issue
Block a user