diff --git a/README.md b/README.md index c70c66a..a4d2286 100644 --- a/README.md +++ b/README.md @@ -22,26 +22,26 @@ :heavy_check_mark: **Better privacy: We don't save tweets or their media** (Outside of temporary Cloudflare caching for speed) --------------------- +--- Here's a little chart comparing features to Twitter default embeds and other embedding services -| | pxTwitter | Twitter default | vxTwitter (BetterTwitFix) | Twxtter (sixFix) | -|-------------------------------------|:------------------:|:------------------:|:--------------------------------:|:---------------------------------:| -| Embed Tweets / Photos | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Embed Videos | :heavy_check_mark: | :x:¹ | :heavy_check_mark: | :heavy_check_mark: | -| Embed Poll results | :heavy_check_mark: | :x: | :x: | :x: | -| Embed Quote Tweets | :heavy_check_mark: | :x: | :heavy_minus_sign: Without Media | :heavy_minus_sign: Without Media | -| Embed Multiple Images | :x: | On Discord | With c.vxtwitter.com | :x: | -| Publicly accessible embed index | :x:² | N/A | :x:² | :heavy_check_mark: | -| Replace t.co with original links | :heavy_check_mark: | :x: | :x: | :x: | -| Media-based embed colors on Discord | :heavy_check_mark: | :x: | :x: | :x: | +| | pxTwitter | Twitter default | vxTwitter (BetterTwitFix) | Twxtter (sixFix) | +| ----------------------------------- | :----------------: | :----------------: | :------------------------------: | :------------------------------: | +| Embed Tweets / Photos | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Embed Videos | :heavy_check_mark: | :x:¹ | :heavy_check_mark: | :heavy_check_mark: | +| Embed Poll results | :heavy_check_mark: | :x: | :x: | :x: | +| Embed Quote Tweets | :heavy_check_mark: | :x: | :heavy_minus_sign: Without Media | :heavy_minus_sign: Without Media | +| Embed Multiple Images | :x: | On Discord | With c.vxtwitter.com | :x: | +| Publicly accessible embed index | :x:² | N/A | :x:² | :heavy_check_mark: | +| Replace t.co with original links | :heavy_check_mark: | :x: | :x: | :x: | +| Media-based embed colors on Discord | :heavy_check_mark: | :x: | :x: | :x: | ¹ Discord will attempt to embed Twitter's video player, but it is unreliable ² Neither pxTwitter or vxTwitter have a public embed ledger, for privacy reasons. vxTwitter still stores all responses in a database / JSON file controlled by the owner. pxTwitter by contrast relies on Cloudflare caching of responses: there is no link store accessible to the owner. --------------------- +--- ## Why pxTwitter is better to develop for and deploy @@ -59,7 +59,7 @@ Clone the repo, install [Node.js](https://nodejs.org/) and run `npm install` in Once you're set up with your worker on `*.workers.dev`, [add your worker to your custom domain](https://developers.cloudflare.com/workers/platform/routing/custom-domains/). --------------------- +--- **Licensed under the permissive MIT license. Feel free to send a pull request!** diff --git a/src/fetch.ts b/src/fetch.ts index 010b646..929db00 100644 --- a/src/fetch.ts +++ b/src/fetch.ts @@ -18,18 +18,21 @@ export const fetchUsingGuest = async (status: string): Promise { `` ].join('') }); -} +}; export const handleStatus = async ( status: string, @@ -62,7 +62,7 @@ export const handleStatus = async ( if (typeof conversation?.globalObjects?.tweets === 'undefined') { return returnError(Strings.ERROR_API_FAIL); } - + /* If we have no idea what happened then just return API error */ return returnError(Strings.ERROR_API_FAIL); } @@ -136,7 +136,7 @@ export const handleStatus = async ( headers.push( ``, ``, - // Use a slightly higher resolution image for profile pics + // Use a slightly higher resolution image for profile pics `/g, '>'); + return text + .replace(/\"/g, '"') + .replace(/\'/g, ''') + .replace(/\/g, '>'); };