diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-11-24 14:54:17 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-11-24 14:54:17 -0400 |
commit | 9e00e7770e5c3987b6a6a1437d79a38ff57115b9 (patch) | |
tree | a65a42647ff0ec5ff497cc7c85676fddbaaa32e3 /src/content/dependencies/linkExternalFlash.js | |
parent | 7f56163ad123b3ba8da431630d3da67f5444adb6 (diff) | |
parent | 45fba07af02d4f161cce494b683918bc76453b82 (diff) |
Merge branch 'contrib-tooltips' into preview
Diffstat (limited to 'src/content/dependencies/linkExternalFlash.js')
-rw-r--r-- | src/content/dependencies/linkExternalFlash.js | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/content/dependencies/linkExternalFlash.js b/src/content/dependencies/linkExternalFlash.js deleted file mode 100644 index 65158ff8..00000000 --- a/src/content/dependencies/linkExternalFlash.js +++ /dev/null @@ -1,41 +0,0 @@ -// Note: This function is seriously hard-coded for HSMusic, with custom -// presentation of links to Homestuck flashes hosted various places. - -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; - - 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); - }, -}; |