From 0491c3db38019db879f63fd60c00fe646cb13fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yisrael=20Dov=20Lebow=20=F0=9F=90=BB?= Date: Thu, 1 Oct 2020 14:18:38 +0300 Subject: [PATCH] reddit regex will match without ending `/` --- static/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/scripts.js b/static/scripts.js index d7f0188..5cca357 100644 --- a/static/scripts.js +++ b/static/scripts.js @@ -579,7 +579,7 @@ async function verifyProof(url, fingerprint) { // Reddit if (/^https:\/\/(?:www\.)?reddit\.com\/user/.test(url)) { output.type = "reddit"; - match = url.match(/https:\/\/(?:www\.)?reddit\.com\/user\/(.*)\/comments\/(.*)\/(.*)\//); + match = url.match(/https:\/\/(?:www\.)?reddit\.com\/user\/(.*)\/comments\/(.*)\/([^/]*)/); output.display = match[1]; output.url = `https://www.reddit.com/user/${match[1]}`; output.proofUrl = `https://www.reddit.com/user/${match[1]}/comments/${match[2]}.json`;