style: auto-fix linting issues
This commit is contained in:
parent
cdbc17d030
commit
3ddcec9211
1 changed files with 4 additions and 4 deletions
|
|
@ -1016,17 +1016,17 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
const track = contextMenu._contextTrack;
|
const track = contextMenu._contextTrack;
|
||||||
const albumItem = contextMenu.querySelector('[data-action="go-to-album"]');
|
const albumItem = contextMenu.querySelector('[data-action="go-to-album"]');
|
||||||
const artistItem = contextMenu.querySelector('[data-action="go-to-artist"]');
|
const artistItem = contextMenu.querySelector('[data-action="go-to-artist"]');
|
||||||
|
|
||||||
if (track) {
|
if (track) {
|
||||||
if (albumItem) {
|
if (albumItem) {
|
||||||
let label = 'Album';
|
let label = 'Album';
|
||||||
const albumType = track.album?.type?.toUpperCase();
|
const albumType = track.album?.type?.toUpperCase();
|
||||||
const trackCount = track.album?.numberOfTracks;
|
const trackCount = track.album?.numberOfTracks;
|
||||||
|
|
||||||
if (albumType === 'SINGLE' || trackCount === 1) label = 'Single';
|
if (albumType === 'SINGLE' || trackCount === 1) label = 'Single';
|
||||||
else if (albumType === 'EP') label = 'EP';
|
else if (albumType === 'EP') label = 'EP';
|
||||||
else if (trackCount && trackCount <= 6) label = 'EP';
|
else if (trackCount && trackCount <= 6) label = 'EP';
|
||||||
|
|
||||||
albumItem.textContent = `Go to ${label}`;
|
albumItem.textContent = `Go to ${label}`;
|
||||||
albumItem.style.display = track.album ? 'block' : 'none';
|
albumItem.style.display = track.album ? 'block' : 'none';
|
||||||
}
|
}
|
||||||
|
|
@ -1039,7 +1039,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
observer.observe(contextMenu, { attributes: true });
|
observer.observe(contextMenu, { attributes: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue