diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-11-24 13:40:52 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-11-24 13:47:39 -0400 |
commit | 3898fbe9380c7a8bc745eff548b112ad2e9c605b (patch) | |
tree | 4b4a16dc2bed109c3979a7b783f88aaafb2d68ab /src/content | |
parent | db786c25a9fafc4cac37b108b4ea433019741c07 (diff) |
content, test: remove unused linkExternalFlash function
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/dependencies/linkExternalFlash.js | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/content/dependencies/linkExternalFlash.js b/src/content/dependencies/linkExternalFlash.js deleted file mode 100644 index e2147da1..00000000 --- a/src/content/dependencies/linkExternalFlash.js +++ /dev/null @@ -1,45 +0,0 @@ -// Note: This function is seriously hard-coded for HSMusic, with custom -// presentation of links to Homestuck flashes hosted various places. - -// This also appears to be dead code, apart from a single snapshot test?? - -export default { - contentDependencies: ['linkExternal'], - extraDependencies: ['html', 'language'], - - relations(relation, url) { - return { - link: relation('linkExternal', url), - }; - }, - - data(url, flash) { - return { - url, - page: flash.page, - }; - }, - - generate(data, relations, {html, language}) { - const {link} = relations; - const {url, page} = data; - - link.setSlot('context', 'flash'); - - return html.tag('span', - {class: 'nowrap'}, - - url.includes('homestuck.com') - ? isNaN(Number(page)) - ? language.$('misc.external.flash.homestuck.secret', {link}) - : language.$('misc.external.flash.homestuck.page', {link, page}) - - : url.includes('bgreco.net') - ? language.$('misc.external.flash.bgreco', {link}) - - : url.includes('youtu') - ? language.$('misc.external.flash.youtube', {link}) - - : link); - }, -}; |