mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-17 02:38:29 +00:00
Change String#match to RegExp#exec
This commit is contained in:
parent
82523bffc8
commit
fc3e4841b0
@ -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", "")
|
||||
|
Loading…
Reference in New Issue
Block a user