« get me outta code hell

client, content: client2.js -> client3.js - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static
diff options
context:
space:
mode:
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
commit43141f1fc41768679b63e154ac21203e928b17c7 (patch)
treeb210eab68ad098f50b0563f7c1b471cb99dcbe88 /src/static
parentc399b00ccea8280032e0576a99eab2d34a04355c (diff)
client, content: client2.js -> client3.js
Diffstat (limited to 'src/static')
-rw-r--r--src/static/client3.js (renamed from src/static/client2.js)39
1 files changed, 0 insertions, 39 deletions
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';