Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Araxeus committed Jan 29, 2022
1 parent 60bb5b8 commit 41b9ab4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
20 changes: 11 additions & 9 deletions plugins/lyrics-genius/front.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = () => {
}

// Check if disabled
if (!tabs.lyrics || !tabs.lyrics.hasAttribute("disabled")) {
if (!tabs.lyrics?.hasAttribute("disabled")) {
return;
}

Expand Down Expand Up @@ -40,14 +40,12 @@ module.exports = () => {
return;
}

tabs.lyrics.removeAttribute("disabled");
tabs.lyrics.removeAttribute("aria-disabled");
enableLyricsTab();

for (tab of [tabs.upNext, tabs.discover]){
tab.onclick = () => {
tabs.lyrics.removeAttribute("disabled");
tabs.lyrics.removeAttribute("aria-disabled");
};
for (tab of [tabs.upNext, tabs.discover]) {
if (tab) {
tab.onclick = enableLyricsTab;
}
}

checkLyricsContainer();
Expand All @@ -74,12 +72,16 @@ module.exports = () => {
}
}

function setLyrics(lyricsContainer){
function setLyrics(lyricsContainer) {
lyricsContainer.innerHTML = `<div id="contents" class="style-scope ytmusic-section-list-renderer description ytmusic-description-shelf-renderer genius-lyrics">
${lyrics}
<yt-formatted-string class="footer style-scope ytmusic-description-shelf-renderer">Source&nbsp;: Genius</yt-formatted-string>
</div>`;
enableLyricsTab()
}

function enableLyricsTab() {
tabs.lyrics.removeAttribute("disabled");
tabs.lyrics.removeAttribute("aria-disabled");
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/lyrics-genius/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
text-decoration: none;
}

#contents.genius-lyrics, .description {
font-size: 1.1vw !important;
.description {
font-size: 1.1vw !important;
text-align: center !important;
}

0 comments on commit 41b9ab4

Please sign in to comment.