2022-09-01 15:51:18 +02:00
|
|
|
export const testers = {
|
2024-07-24 17:05:21 +02:00
|
|
|
"bilibili": (patternMatch) =>
|
2024-02-15 19:11:18 +01:00
|
|
|
patternMatch.comId?.length <= 12 || patternMatch.comShortLink?.length <= 16
|
|
|
|
|| patternMatch.tvId?.length <= 24,
|
2022-08-04 13:22:40 +02:00
|
|
|
|
2024-02-21 01:50:48 +01:00
|
|
|
"dailymotion": (patternMatch) => patternMatch.id?.length <= 32,
|
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"instagram": (patternMatch) =>
|
|
|
|
patternMatch.postId?.length <= 12
|
|
|
|
|| (patternMatch.username?.length <= 30 && patternMatch.storyId?.length <= 24),
|
2024-05-29 09:12:52 +02:00
|
|
|
|
|
|
|
"loom": (patternMatch) =>
|
|
|
|
patternMatch.id?.length <= 32,
|
|
|
|
|
2024-01-17 08:02:52 +01:00
|
|
|
"ok": (patternMatch) =>
|
|
|
|
patternMatch.id?.length <= 16,
|
2022-08-04 13:22:40 +02:00
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"pinterest": (patternMatch) =>
|
2024-01-17 10:05:39 +01:00
|
|
|
patternMatch.id?.length <= 128 || patternMatch.shortLink?.length <= 32,
|
2022-08-04 13:22:40 +02:00
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"reddit": (patternMatch) =>
|
2024-05-03 10:09:46 +02:00
|
|
|
(patternMatch.sub?.length <= 22 && patternMatch.id?.length <= 10)
|
|
|
|
|| (patternMatch.user?.length <= 22 && patternMatch.id?.length <= 10),
|
2022-08-04 13:22:40 +02:00
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"rutube": (patternMatch) =>
|
2024-05-29 09:02:05 +02:00
|
|
|
(patternMatch.id?.length === 32 && patternMatch.key?.length <= 32) ||
|
2024-04-29 17:36:35 +02:00
|
|
|
patternMatch.id?.length === 32 || patternMatch.yappyId?.length === 32,
|
2022-08-04 13:22:40 +02:00
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"soundcloud": (patternMatch) =>
|
2024-07-24 17:05:21 +02:00
|
|
|
(patternMatch.author?.length <= 255 && patternMatch.song?.length <= 255)
|
2023-11-23 17:18:49 +01:00
|
|
|
|| patternMatch.shortLink?.length <= 32,
|
2022-08-04 13:22:40 +02:00
|
|
|
|
2024-07-24 17:06:10 +02:00
|
|
|
"snapchat": (patternMatch) =>
|
|
|
|
(patternMatch.username?.length <= 32 && (!patternMatch.storyId || patternMatch.storyId?.length <= 255))
|
|
|
|
|| patternMatch.spotlightId?.length <= 255
|
|
|
|
|| patternMatch.shortLink?.length <= 16,
|
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"streamable": (patternMatch) =>
|
|
|
|
patternMatch.id?.length === 6,
|
2024-05-29 09:12:52 +02:00
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"tiktok": (patternMatch) =>
|
|
|
|
patternMatch.postId?.length <= 21 || patternMatch.id?.length <= 13,
|
2022-08-04 13:22:40 +02:00
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"tumblr": (patternMatch) =>
|
|
|
|
patternMatch.id?.length < 21
|
|
|
|
|| (patternMatch.id?.length < 21 && patternMatch.user?.length <= 32),
|
2022-08-13 13:14:09 +02:00
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"twitch": (patternMatch) =>
|
|
|
|
patternMatch.channel && patternMatch.clip?.length <= 100,
|
2023-09-16 12:27:53 +02:00
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"twitter": (patternMatch) =>
|
|
|
|
patternMatch.id?.length < 20,
|
2023-04-24 21:01:25 +02:00
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"vimeo": (patternMatch) =>
|
2024-03-05 00:26:14 +01:00
|
|
|
patternMatch.id?.length <= 11
|
|
|
|
&& (!patternMatch.password || patternMatch.password.length < 16),
|
2023-09-16 12:27:53 +02:00
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"vine": (patternMatch) =>
|
|
|
|
patternMatch.id?.length <= 12,
|
2023-04-29 21:33:36 +02:00
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"vk": (patternMatch) =>
|
|
|
|
patternMatch.userId?.length <= 10 && patternMatch.videoId?.length <= 10,
|
2023-08-19 18:42:10 +02:00
|
|
|
|
2023-11-23 17:18:49 +01:00
|
|
|
"youtube": (patternMatch) =>
|
|
|
|
patternMatch.id?.length <= 11,
|
2024-07-24 17:05:21 +02:00
|
|
|
|
|
|
|
"facebook": (patternMatch) =>
|
|
|
|
patternMatch.shortLink?.length <= 11
|
|
|
|
|| patternMatch.username?.length <= 30
|
|
|
|
|| patternMatch.caption?.length <= 255
|
|
|
|
|| patternMatch.id?.length <= 20,
|
2023-02-12 08:40:49 +01:00
|
|
|
}
|