From fc3e4841b0d13d8331c394741aad8c13d7ff101d Mon Sep 17 00:00:00 2001 From: jbmagination <26027089+jbmagination@users.noreply.github.com> Date: Sun, 5 Nov 2023 12:13:24 -0500 Subject: [PATCH] Change String#match to RegExp#exec --- src/modules/processing/hostOverrides.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/processing/hostOverrides.js b/src/modules/processing/hostOverrides.js index 88b76f6c..15e2d41c 100644 --- a/src/modules/processing/hostOverrides.js +++ b/src/modules/processing/hostOverrides.js @@ -28,7 +28,7 @@ export default function (inHost, inURL) { host = "twitter"; url = url.replace("https://fixvx.com/", "https://twitter.com/") } - if (url.match(/^https:\/\/(d\.|dl\.|)(fxtwitter|twittpr|fixupx).com\//g)) { + if (/^https:\/\/(d\.|dl\.|)(fxtwitter|twittpr|fixupx).com\//g.test(url)) { host = "twitter"; url = url.replace(url.match(/^https:\/\/(d\.|dl\.|)(fxtwitter|twittpr|fixupx).com\//g)[0], "https://twitter.com/") if (url.endsWith(".mp4")) url = url.replace(".mp4", "")