mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-05-04 10:43:49 +01:00
Prettier + update README
This commit is contained in:
parent
b7f10cfd04
commit
fdf519c21a
3 changed files with 27 additions and 20 deletions
34
README.md
34
README.md
|
@ -86,23 +86,23 @@ Furthermore, if the person who posted a pxTwitter link forgot to strip tracking,
|
||||||
|
|
||||||
In many ways, pxTwitter has richer embeds and does more. Here's a table comparing some of pxTwitter's features compared to Twitter default embeds as well as other embedding services
|
In many ways, pxTwitter has richer embeds and does more. Here's a table comparing some of pxTwitter's features compared to Twitter default embeds as well as other embedding services
|
||||||
|
|
||||||
| | pxTwitter | Twitter default | vxTwitter (BetterTwitFix) | Twxtter (sixFix) |
|
| | pxTwitter | Twitter default | vxTwitter (BetterTwitFix) | Twxtter (sixFix) |
|
||||||
| --------------------------------------- | :--------------------------------------: | :------------------------------: | :------------------------------------------: | :-----------------------------------: |
|
| --------------------------------------- | :---------------------------------: | :------------------------------: | :------------------------------------------: | :-----------------------------------: |
|
||||||
| Embed Tweets / Images | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|
| Embed Tweets / Images | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|
||||||
| Embed profile pictures on text Tweets | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: |
|
| Embed profile pictures on text Tweets | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: |
|
||||||
| Embed Twitter Videos | :heavy_check_mark: | :x:¹ | :heavy_check_mark: | :heavy_check_mark: |
|
| Embed Twitter Videos | :heavy_check_mark: | :x:¹ | :heavy_check_mark: | :heavy_check_mark: |
|
||||||
| Embed External Videos (YouTube, etc.) | :heavy_check_mark:⁶ | :x: | :x:⁴ | :x: |
|
| Embed External Videos (YouTube, etc.) | :heavy_check_mark:⁶ | :x: | :x:⁴ | :x: |
|
||||||
| Embed Poll results | :heavy_check_mark: | :x: | :x: | :x: |
|
| Embed Poll results | :heavy_check_mark: | :x: | :x: | :x: |
|
||||||
| Embed Quote Tweets | :heavy_check_mark: | :x: | :ballot_box_with_check: Without Media | :ballot_box_with_check: Without Media |
|
| Embed Quote Tweets | :heavy_check_mark: | :x: | :ballot_box_with_check: Without Media | :ballot_box_with_check: Without Media |
|
||||||
| Embed Multiple Images | :ballot_box_with_check: Except Telegram⁵ | :heavy_minus_sign: Discord Only³ | :ballot_box_with_check: With c.vxtwitter.com | :x: |
|
| Embed Multiple Images | :heavy_check_mark: | :heavy_minus_sign: Discord Only³ | :ballot_box_with_check: With c.vxtwitter.com | :x: |
|
||||||
| Translate Tweets | :heavy_check_mark: | :x: | :x: | :x: |
|
| Translate Tweets | :heavy_check_mark: | :x: | :x: | :x: |
|
||||||
| Publicly accessible embed index | :x:² | N/A | :x:² | :heavy_check_mark: |
|
| Publicly accessible embed index | :x:² | N/A | :x:² | :heavy_check_mark: |
|
||||||
| Replace t.co with original links | :heavy_check_mark: | :x: | :x: | :x: |
|
| Replace t.co with original links | :heavy_check_mark: | :x: | :x: | :x: |
|
||||||
| Media-based embed colors on Discord | :heavy_check_mark: | :x: | :x: | :x: |
|
| Media-based embed colors on Discord | :heavy_check_mark: | :x: | :x: | :x: |
|
||||||
| Redirect to media file (wihout embed) | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: |
|
| Redirect to media file (wihout embed) | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: |
|
||||||
| Strip Twitter tracking info on redirect | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: |
|
| Strip Twitter tracking info on redirect | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: |
|
||||||
| Show retweet, like, reply counts | :heavy_check_mark: | :heavy_minus_sign: Discord Only³ | :ballot_box_with_check: No replies | :ballot_box_with_check: No replies |
|
| Show retweet, like, reply counts | :heavy_check_mark: | :heavy_minus_sign: Discord Only³ | :ballot_box_with_check: No replies | :ballot_box_with_check: No replies |
|
||||||
| Discord sed replace (`s/`) friendly | twittpr.com | N/A | :x: | :heavy_check_mark: |
|
| Discord sed replace (`s/`) friendly | :ballot_box_with_check: twittpr.com | N/A | :x: | :heavy_check_mark: |
|
||||||
|
|
||||||
¹ Discord will attempt to embed Twitter's video player, but it is unreliable
|
¹ Discord will attempt to embed Twitter's video player, but it is unreliable
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
import { Constants } from './constants';
|
import { Constants } from './constants';
|
||||||
|
|
||||||
export const handleMosaic = async (mediaList: TweetMedia[], userAgent: string): Promise<TweetMedia> => {
|
export const handleMosaic = async (
|
||||||
|
mediaList: TweetMedia[],
|
||||||
|
userAgent: string
|
||||||
|
): Promise<TweetMedia> => {
|
||||||
let mosaicDomains = Constants.MOSAIC_DOMAIN_LIST;
|
let mosaicDomains = Constants.MOSAIC_DOMAIN_LIST;
|
||||||
let selectedDomain: string | null = null;
|
let selectedDomain: string | null = null;
|
||||||
while (selectedDomain === null && mosaicDomains.length > 0) {
|
while (selectedDomain === null && mosaicDomains.length > 0) {
|
||||||
|
@ -27,7 +30,9 @@ export const handleMosaic = async (mediaList: TweetMedia[], userAgent: string):
|
||||||
);
|
);
|
||||||
console.log('mosaicMedia', mosaicMedia);
|
console.log('mosaicMedia', mosaicMedia);
|
||||||
// TODO: use a better system for this, 0 gets png 1 gets webp, usually
|
// TODO: use a better system for this, 0 gets png 1 gets webp, usually
|
||||||
let constructUrl = `https://${selectedDomain}/${userAgent.indexOf('Telegram') > -1 ? '0' : '1'}`;
|
let constructUrl = `https://${selectedDomain}/${
|
||||||
|
userAgent.indexOf('Telegram') > -1 ? '0' : '1'
|
||||||
|
}`;
|
||||||
if (mosaicMedia[0]) {
|
if (mosaicMedia[0]) {
|
||||||
constructUrl += `/${mosaicMedia[0]}`;
|
constructUrl += `/${mosaicMedia[0]}`;
|
||||||
}
|
}
|
||||||
|
@ -41,6 +46,8 @@ export const handleMosaic = async (mediaList: TweetMedia[], userAgent: string):
|
||||||
constructUrl += `/${mosaicMedia[3]}`;
|
constructUrl += `/${mosaicMedia[3]}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(`Mosaic URL: ${constructUrl}`)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
media_url_https: constructUrl,
|
media_url_https: constructUrl,
|
||||||
original_info: {
|
original_info: {
|
||||||
|
|
|
@ -283,7 +283,7 @@ export const handleStatus = async (
|
||||||
console.log(`Media ${mediaNumber} found`);
|
console.log(`Media ${mediaNumber} found`);
|
||||||
actualMediaNumber = mediaNumber - 1;
|
actualMediaNumber = mediaNumber - 1;
|
||||||
processMedia(mediaList[actualMediaNumber]);
|
processMedia(mediaList[actualMediaNumber]);
|
||||||
} else if (mediaList.length === 1 ) {
|
} else if (mediaList.length === 1) {
|
||||||
console.log(`Media ${mediaNumber} not found, ${mediaList.length} total`);
|
console.log(`Media ${mediaNumber} not found, ${mediaList.length} total`);
|
||||||
processMedia(firstMedia);
|
processMedia(firstMedia);
|
||||||
} else if (mediaList.length > 1) {
|
} else if (mediaList.length > 1) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue