diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-11-15 18:19:00 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-11-15 18:56:58 -0400 |
commit | 43141f1fc41768679b63e154ac21203e928b17c7 (patch) | |
tree | b210eab68ad098f50b0563f7c1b471cb99dcbe88 | |
parent | c399b00ccea8280032e0576a99eab2d34a04355c (diff) |
client, content: client2.js -> client3.js
-rw-r--r-- | src/content/dependencies/generatePageLayout.js | 2 | ||||
-rw-r--r-- | src/static/client3.js (renamed from src/static/client2.js) | 39 |
2 files changed, 1 insertions, 40 deletions
diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js index 3bf0c9f0..95551f3e 100644 --- a/src/content/dependencies/generatePageLayout.js +++ b/src/content/dependencies/generatePageLayout.js @@ -655,7 +655,7 @@ export default { html.tag('script', { type: 'module', - src: to('shared.staticFile', 'client2.js', cachebust), + src: to('shared.staticFile', 'client3.js', cachebust), }), ]), ]) diff --git a/src/static/client2.js b/src/static/client3.js index b72933d0..94d4c4e2 100644 --- a/src/static/client2.js +++ b/src/static/client3.js @@ -14,7 +14,6 @@ import { } from '../util/wiki-data.js'; let albumData, artistData; -let officialAlbumData, fandomAlbumData, beyondAlbumData; let ready = false; @@ -200,39 +199,10 @@ function addRandomLinkListeners() { break; } - /* Legacy links, for old versions * - * of generateListRandomPageLinksGroupSection */ - - case 'album-in-official': - a.href = openAlbum(pick(officialAlbumData).directory); - break; - - case 'album-in-fandom': - a.href = openAlbum(pick(fandomAlbumData).directory); - break; - - case 'album-in-beyond': - a.href = openAlbum(pick(beyondAlbumData).directory); - break; - - /* End legacy links */ - case 'track-in-album': a.href = openTrack(getRefDirectory(pick(getAlbum(a).tracks))); break; - case 'track-in-official': - a.href = openTrack(getRefDirectory(pick(tracks(officialAlbumData)))); - break; - - case 'track-in-fandom': - a.href = openTrack(getRefDirectory(pick(tracks(fandomAlbumData)))); - break; - - case 'track-in-beyond': - a.href = openTrack(getRefDirectory(pick(tracks(beyondAlbumData)))); - break; - case 'artist': a.href = openArtist(pick(artistData).directory); break; @@ -304,15 +274,6 @@ fetch(rebase('data.json', 'rebaseShared')) albumData = data.albumData; artistData = data.artistData; - const albumsInGroup = directory => - albumData - .filter(album => - album.groups.includes(`group:${directory}`)); - - officialAlbumData = albumsInGroup('official'); - fandomAlbumData = albumsInGroup('fandom'); - beyondAlbumData = albumsInGroup('beyond'); - for (const element of elements1) element.style.display = 'none'; for (const element of elements2) element.style.display = 'block'; |