reddit: add support for user post links & clean up (#484)

This commit is contained in:
wukko 2024-05-03 14:09:46 +06:00 • committed by GitHub
parent 080fc043ea
commit a5a01cc0c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 49 additions and 17 deletions

View file

@ -16,7 +16,8 @@ export const testers = {
patternMatch.id?.length <= 128 || patternMatch.shortLink?.length <= 32,
"reddit": (patternMatch) =>
patternMatch.sub?.length <= 22 && patternMatch.id?.length <= 10,
(patternMatch.sub?.length <= 22 && patternMatch.id?.length <= 10)
|| (patternMatch.user?.length <= 22 && patternMatch.id?.length <= 10),
"rutube": (patternMatch) =>
patternMatch.id?.length === 32 || patternMatch.yappyId?.length === 32,