diff options
Diffstat (limited to 'src')
-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'; |