From 300c0dbfd206a9a6043c32a5f7e0e03ddafab33d Mon Sep 17 00:00:00 2001 From: maomao <1714487678@qq.com> Date: Sat, 18 May 2024 20:12:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(remove-redirect):=20=E9=80=82=E9=85=8D?= =?UTF-8?q?=E6=8E=A8=E7=89=B9=EF=BC=88Twitter=EF=BC=89=E6=96=B0=E5=9F=9F?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/chilly-masks-wait.md | 5 +++++ packages/remove-redirect/src/sites/twitter.com.ts | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/chilly-masks-wait.md diff --git a/.changeset/chilly-masks-wait.md b/.changeset/chilly-masks-wait.md new file mode 100644 index 0000000..9d2ef39 --- /dev/null +++ b/.changeset/chilly-masks-wait.md @@ -0,0 +1,5 @@ +--- +'remove-redirect': patch +--- + +适配推特(Twitter)新域名 diff --git a/packages/remove-redirect/src/sites/twitter.com.ts b/packages/remove-redirect/src/sites/twitter.com.ts index 334b8a4..f18a66d 100644 --- a/packages/remove-redirect/src/sites/twitter.com.ts +++ b/packages/remove-redirect/src/sites/twitter.com.ts @@ -4,11 +4,13 @@ import { validateUrl } from '@femm/shared-utils' ** Twitter ** - https://twitter.com ** - https://twitter.com/vuejs + ** - https://x.com + ** - https://x.com/vuejs ******************************************************************************/ const sites: SiteModule = [ [ '推特(Twitter)', - 'twitter.com', + /^(twitter|x)\.com$/, { transform: { selector: 'a[href*="://t.co/"]',