Skip to content

Commit

Permalink
chore: add prettier
Browse files Browse the repository at this point in the history
for more consistency 😉
  • Loading branch information
okdargy committed May 25, 2024
1 parent c86f25d commit dd02f11
Show file tree
Hide file tree
Showing 17 changed files with 4,022 additions and 4,016 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-wrangler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: deploy src/index.ts --minify
command: deploy src/index.ts --minify
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingComma": "none",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"jsxSingleQuote": true,
"printWidth": 120
}
32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,46 @@
# 📦 fxTikTok

[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/okdargy/fxtiktok)

Embed TikTok videos and slideshows on Discord with just `s/i/n`

## Screenshots

<details>
<summary>Click here to see how fxTikTok looks like</summary>

| <img src="https://raw.githubusercontent.com/okdargy/fxTikTok/master/.github/readme/compare.png" alt="Video Preview" width="90%" height="90%"/> |
|:--:|
| Comparing `tiktok.com` vs. `tnktok.com` embeds on Discord |
| <img src="https://raw.githubusercontent.com/okdargy/fxTikTok/master/.github/readme/compare.png" alt="Video Preview" width="90%" height="90%"/> |
| :--------------------------------------------------------------------------------------------------------------------------------------------: |
| Comparing `tiktok.com` vs. `tnktok.com` embeds on Discord |

| <img src="https://raw.githubusercontent.com/okdargy/fxTikTok/master/.github/readme/slideshow.png" height="40%" width="40%" alt="Slideshow Preview" /> |
|:--:|
| Slideshow embeds |
| <img src="https://raw.githubusercontent.com/okdargy/fxTikTok/master/.github/readme/slideshow.png" height="40%" width="40%" alt="Slideshow Preview" /> |
| :---------------------------------------------------------------------------------------------------------------------------------------------------: |
| Slideshow embeds |

| <img src="https://raw.githubusercontent.com/okdargy/fxTikTok/master/.github/readme/direct.png" alt="Direct Preview" /> |
|:--:|
| Direct image/video support |
| <img src="https://raw.githubusercontent.com/okdargy/fxTikTok/master/.github/readme/direct.png" alt="Direct Preview" /> |
| :--------------------------------------------------------------------------------------------------------------------: |
| Direct image/video support |

</details>

## Usage

Using fxTikTok is easy on Discord. Fix ugly and unresponsive embeds by sending your TikTok link and then typing `s/i/n`

### How does this work?

When you send `s/i/n` in Discord, it modifies your most recent message. Specifically, it replaces the first occurrence of the second parameter (`i`) in the message with the third parameter (`n`).

| Before | After |
|:--:|:--:|
| Before | After |
| :------------: | :------------: |
| t**i**ktok.com | t**n**ktok.com |

### Using Direct Embeds

Don't want all that statistic clutter on your embed and only want the video or image? Simply change your URL to `d.tnktok.com`

| Before | After |
|:--:|:--:|
| Before | After |
| :--------------------: | :------------------: |
| **www**.t**i**ktok.com | **d**.t**n**ktok.com |

> Alternatively, you can also set `isDirect` to true thru the URL query by adding `?isDirect=true` at the end of your URL
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"scripts": {
"dev": "wrangler dev src/index.ts --env=local",
"build": "wrangler build src/index.ts",
"deploy": "wrangler deploy --minify src/index.ts"
"deploy": "wrangler deploy --minify src/index.ts",
"prettier": "prettier . --write"
},
"dependencies": {
"@types/set-cookie-parser": "^2.4.7",
Expand All @@ -14,6 +15,7 @@
"devDependencies": {
"@cloudflare/workers-types": "^4.20230914.0",
"@types/react": "^18.2.46",
"prettier": "3.2.5",
"wrangler": "^3.21.0"
},
"homepage": "https://tnktok.com"
Expand Down
Loading

0 comments on commit dd02f11

Please sign in to comment.