Update StopTheMadness regex for copy/pasting properly
CI / Typecheck, test, build (push) Successful in 51s
Publish / Build and push (push) Successful in 2m8s

This commit is contained in:
2026-08-26 13:50:49 -03:00
parent deeedbcc85
commit 2a8f71adc7
+25 -25
View File
@@ -21,13 +21,13 @@ readable in your history.
Replace `antisocial.example.com` with wherever you are running it. Replace `antisocial.example.com` with wherever you are running it.
| Platform | Find | Replace | | Platform | Find | Replace |
| --- | --- | --- | | --------- | ------------------------------------------------------------- | ------------------------------------------- |
| X | `^https://(?:www\.\|mobile\.)?(?:x\|twitter)\.com/(.*)$` | `https://antisocial.example.com/x/$1` | | X | `/^https:\/\/(?:www\.\|mobile\.)?(?:x\|twitter)\.com\/(.*)$/` | `https://antisocial.example.com/x/$1` |
| Threads | `^https://(?:www\.)?threads\.(?:net\|com)/(.*)$` | `https://antisocial.example.com/threads/$1` | | Threads | `/^https:\/\/(?:www\.)?threads\.(?:net\|com)\/(.*)$/` | `https://antisocial.example.com/threads/$1` |
| Instagram | `^https://(?:www\.)?instagram\.com/(.*)$` | `https://antisocial.example.com/ig/$1` | | Instagram | `/^https:\/\/(?:www\.)?instagram\.com\/(.*)$/` | `https://antisocial.example.com/ig/$1` |
| TikTok | `^https://(?:www\.\|vm\.\|vt\.)?tiktok\.com/(.*)$` | `https://antisocial.example.com/tiktok/$1` | | TikTok | `/^https:\/\/(?:www\.\|vm\.\|vt\.)?tiktok\.com\/(.*)$/` | `https://antisocial.example.com/tiktok/$1` |
| Bluesky | `^https://bsky\.app/(.*)$` | `https://antisocial.example.com/bsky/$1` | | Bluesky | `/^https:\/\/bsky\.app\/(.*)$/` | `https://antisocial.example.com/bsky/$1` |
So `https://x.com/user/status/123` becomes So `https://x.com/user/status/123` becomes
`https://antisocial.example.com/x/user/status/123`. `https://antisocial.example.com/x/user/status/123`.
@@ -54,13 +54,13 @@ Each adapter layers its extraction, most structured first:
3. **The rendered DOM** — whatever is actually on screen is real. 3. **The rendered DOM** — whatever is actually on screen is real.
4. **Open Graph tags** — the floor, and enough to show something. 4. **Open Graph tags** — the floor, and enough to show something.
| Platform | Loads | Reads | | Platform | Loads | Reads |
| --- | --- | --- | | --------- | ---------------------------- | -------------------------------------------------------- |
| Bluesky | the public AT Protocol API | `getPostThread`; falls back to the post page | | Bluesky | the public AT Protocol API | `getPostThread`; falls back to the post page |
| X | `platform.twitter.com` embed | the `cdn.syndication.twimg.com/tweet-result` response | | X | `platform.twitter.com` embed | the `cdn.syndication.twimg.com/tweet-result` response |
| Instagram | `/embed/captioned/` | `shortcode_media`, then the rendered `<video>`/`<img>` | | Instagram | `/embed/captioned/` | `shortcode_media`, then the rendered `<video>`/`<img>` |
| TikTok | the post page | `__UNIVERSAL_DATA_FOR_REHYDRATION__` | | TikTok | the post page | `__UNIVERSAL_DATA_FOR_REHYDRATION__` |
| Threads | the post page | the Relay payloads in `<script type="application/json">` | | Threads | the post page | the Relay payloads in `<script type="application/json">` |
Media never gets linked straight at a CDN. Instagram and TikTok reject requests without Media never gets linked straight at a CDN. Instagram and TikTok reject requests without
a matching `Referer` (and sometimes cookies), and proxying keeps your browser from a matching `Referer` (and sometimes cookies), and proxying keeps your browser from
@@ -156,17 +156,17 @@ ground for a project this size.
Everything has a working default; the container needs none of it set. Everything has a working default; the container needs none of it set.
| Variable | Default | | | Variable | Default | |
| --- | --- | --- | | ---------------------------- | ------------------------------------------ | --------------------------------------------------------------------------------- |
| `PORT` / `HOST` | `8080` / `0.0.0.0` | | | `PORT` / `HOST` | `8080` / `0.0.0.0` | |
| `PROFILE_DIR` | `./profile` (`/data/profile` in the image) | Chromium cookies and storage, persisted so the browser accumulates ordinary state | | `PROFILE_DIR` | `./profile` (`/data/profile` in the image) | Chromium cookies and storage, persisted so the browser accumulates ordinary state |
| `MAX_CONCURRENT` | `2` | page loads at once; the rest queue | | `MAX_CONCURRENT` | `2` | page loads at once; the rest queue |
| `NAVIGATION_TIMEOUT_MS` | `20000` | | | `NAVIGATION_TIMEOUT_MS` | `20000` | |
| `RESOLVE_TIMEOUT_MS` | `30000` | whole resolve, including extraction | | `RESOLVE_TIMEOUT_MS` | `30000` | whole resolve, including extraction |
| `CACHE_TTL_MS` / `CACHE_MAX` | `3600000` / `200` | resolved posts, in memory | | `CACHE_TTL_MS` / `CACHE_MAX` | `3600000` / `200` | resolved posts, in memory |
| `MEDIA_TOKEN_TTL_MS` | `21600000` | how long a `/m/` reference stays valid | | `MEDIA_TOKEN_TTL_MS` | `21600000` | how long a `/m/` reference stays valid |
| `PUBLIC_ORIGIN` | `http://localhost:8080` | only used to print the rules on `/` | | `PUBLIC_ORIGIN` | `http://localhost:8080` | only used to print the rules on `/` |
| `LOG_LEVEL` | `info` | | | `LOG_LEVEL` | `info` | |
## Adding a platform ## Adding a platform