Make www optional for reddit regex

This commit is contained in:
Yarmo Mackenbach 2020-07-16 09:25:37 +02:00
parent 3e30a4f071
commit 3007cbba4b

View file

@ -434,7 +434,7 @@ async function verifyProof(url, fingerprint) {
}
}
// Reddit
if (/^https:\/\/www.reddit.com\/user/.test(url)) {
if (/^https:\/\/(?:www\.)?reddit\.com\/user/.test(url)) {
output.type = "reddit";
match = url.match(/https:\/\/www.reddit.com\/user\/(.*)\/comments\/(.*)\/(.*)\//);
output.display = match[1];