From 72dbd9a7b6003174e230b6c4cc160db122ac932d Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 29 Mar 2020 15:05:52 -0400 Subject: [PATCH] Fix sources not appearing for the new wildcard attributions --- media/attribution.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/media/attribution.js b/media/attribution.js index f8bc2937..b65ad2b5 100644 --- a/media/attribution.js +++ b/media/attribution.js @@ -11408,8 +11408,18 @@ function ownersOfFull(file) { function sourceOf(file) { if (attribution.files[file]) return attribution.files[file].source; - else - return undefined; + else { + const found = attribution.prefixes[Object.keys(attribution.prefixes).find(path => { + return (file.indexOf(path) == 0); + })]; + + + if (found === undefined) { + return undefined; + } else { + return found.source; + } + } } prepareAttribution();