From 4076727ed3c3a052a6923f08192e4fea234e3fa4 Mon Sep 17 00:00:00 2001 From: mzivil <158518982+mzivil@users.noreply.github.com> Date: Fri, 2 Feb 2024 12:43:24 -0500 Subject: [PATCH 1/2] fix yewtu.be links showing up as dupes of each other --- api/resolvers/item.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/resolvers/item.js b/api/resolvers/item.js index 6ecf4e38..13ed049b 100644 --- a/api/resolvers/item.js +++ b/api/resolvers/item.js @@ -568,6 +568,9 @@ export default { // extract id and create both links const matches = url.match(/(https?:\/\/)?((www\.)?(youtube(-nocookie)?|youtube.googleapis)\.com.*(v\/|v=|vi=|vi\/|e\/|embed\/|user\/.*\/u\/\d+\/)|youtu\.be\/)(?[_0-9a-z-]+)/i) similar = `(http(s)?://)?((www.|m.)?youtube.com/(watch\\?v=|v/|live/)${matches?.groups?.id}|youtu.be/${matches?.groups?.id})((\\?|&|#)%)?` + } else if (urlObj.hostname === 'yewtu.be') { + const matches = url.match(/(https?:\/\/)?yewtu\.be.*(v=|embed\/)(?[_0-9a-z-]+)/i) + similar = `(http(s)?://)?yewtu.be/(watch\\?v=|embed/)${matches?.groups?.id}((\\?|&|#)%)?` } else { similar += '((\\?|#)%)?' } From d861890d350f7525ccfb24f1390a4e1b2145b62c Mon Sep 17 00:00:00 2001 From: mzivil <158518982+mzivil@users.noreply.github.com> Date: Fri, 2 Feb 2024 14:19:23 -0500 Subject: [PATCH 2/2] add sn nym to contributors --- contributors.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/contributors.txt b/contributors.txt index 51b547e8..922e9b82 100644 --- a/contributors.txt +++ b/contributors.txt @@ -6,3 +6,4 @@ rleed bitcoinplebdev benthecarman stargut +mz