« get me outta code hell

simple data serialization & random pages fixes - 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>2022-03-12 19:07:22 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-03-12 19:07:22 -0400
commit6a86a6aca6215cb4d464b814c34233b001575cd9 (patch)
treecfa90beb1027beda33b4f37c0883bfc99e2d3fad /src/static
parentf27c98a228847d5f300a2d3c1252294d673b639e (diff)
simple data serialization & random pages fixes
Diffstat (limited to 'src/static')
-rw-r--r--src/static/client.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/static/client.js b/src/static/client.js
index c12ff355..7397735c 100644
--- a/src/static/client.js
+++ b/src/static/client.js
@@ -9,6 +9,10 @@ import {
     getColors
 } from '../util/colors.js';
 
+import {
+    getArtistNumContributions
+} from '../util/wiki-data.js';
+
 let albumData, artistData, flashData;
 let officialAlbumData, fandomAlbumData, artistNames;
 
@@ -137,7 +141,7 @@ for (const a of document.body.querySelectorAll('[data-random]')) {
             case 'track-in-fandom': return a.href = openTrack(getRefDirectory(pick(fandomAlbumData.reduce((acc, album) => acc.concat(album.tracks), []))));
             case 'track-in-official': return a.href = openTrack(getRefDirectory(pick(officialAlbumData.reduce((acc, album) => acc.concat(album.tracks), []))));
             case 'artist': return a.href = openArtist(pick(artistData).directory);
-            case 'artist-more-than-one-contrib': return a.href = openArtist(pick(artistData.filter(artist => C.getArtistNumContributions(artist) > 1)).directory);
+            case 'artist-more-than-one-contrib': return a.href = openArtist(pick(artistData.filter(artist => getArtistNumContributions(artist) > 1)).directory);
         }
     });
 }