diff options
Diffstat (limited to 'src/static/js')
| -rw-r--r-- | src/static/js/client-util.js | 1 | ||||
| -rw-r--r-- | src/static/js/client/album-commentary-sidebar.js | 5 | ||||
| -rw-r--r-- | src/static/js/client/sidebar-search.js | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/static/js/client-util.js b/src/static/js/client-util.js index a6846714..51fbb1f0 100644 --- a/src/static/js/client-util.js +++ b/src/static/js/client-util.js @@ -103,6 +103,7 @@ export const openArtist = d => rebase(`artist/${d}/`); export const openFlash = d => rebase(`flash/${d}/`); export const openGroup = d => rebase(`group/${d}/`); export const openTrack = d => rebase(`track/${d}/`); +export const openVGMAlbum = d => rebase(`vgm-album/${d}/`); // TODO: This should also use urlSpec. diff --git a/src/static/js/client/album-commentary-sidebar.js b/src/static/js/client/album-commentary-sidebar.js index d7c4a591..144544ed 100644 --- a/src/static/js/client/album-commentary-sidebar.js +++ b/src/static/js/client/album-commentary-sidebar.js @@ -23,7 +23,10 @@ export const info = { }; export function getPageReferences() { - if (document.documentElement.dataset.urlKey !== 'localized.albumCommentary') { + if ( + document.documentElement.dataset.urlKey !== 'localized.albumCommentary' && + document.documentElement.dataset.urlKey !== 'localized.vgmAlbumCommentary' + ) { return; } diff --git a/src/static/js/client/sidebar-search.js b/src/static/js/client/sidebar-search.js index 94f1e4ef..3c6666e9 100644 --- a/src/static/js/client/sidebar-search.js +++ b/src/static/js/client/sidebar-search.js @@ -16,6 +16,7 @@ import { openFlash, openGroup, openTrack, + openVGMAlbum, rebase, templateContent, } from '../client-util.js'; @@ -1109,7 +1110,9 @@ function generateSidebarSearchResult(result, results) { switch (result.referenceType) { case 'album': { preparedSlots.href = - openAlbum(result.directory); + (result.data.classification === 'in-game vgm' + ? openVGMAlbum(result.directory) + : openAlbum(result.directory)); preparedSlots.kindString = (result.data.classification === 'single' |