mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
lint
This commit is contained in:
@ -11,7 +11,7 @@ module.exports = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if disabled
|
// Check if disabled
|
||||||
if (!tabs.lyrics || !tabs.lyrics.hasAttribute("disabled")) {
|
if (!tabs.lyrics?.hasAttribute("disabled")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,14 +40,12 @@ module.exports = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
tabs.lyrics.removeAttribute("disabled");
|
enableLyricsTab();
|
||||||
tabs.lyrics.removeAttribute("aria-disabled");
|
|
||||||
|
|
||||||
for (tab of [tabs.upNext, tabs.discover]){
|
for (tab of [tabs.upNext, tabs.discover]) {
|
||||||
tab.onclick = () => {
|
if (tab) {
|
||||||
tabs.lyrics.removeAttribute("disabled");
|
tab.onclick = enableLyricsTab;
|
||||||
tabs.lyrics.removeAttribute("aria-disabled");
|
}
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
checkLyricsContainer();
|
checkLyricsContainer();
|
||||||
@ -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">
|
lyricsContainer.innerHTML = `<div id="contents" class="style-scope ytmusic-section-list-renderer description ytmusic-description-shelf-renderer genius-lyrics">
|
||||||
${lyrics}
|
${lyrics}
|
||||||
|
|
||||||
<yt-formatted-string class="footer style-scope ytmusic-description-shelf-renderer">Source : Genius</yt-formatted-string>
|
<yt-formatted-string class="footer style-scope ytmusic-description-shelf-renderer">Source : Genius</yt-formatted-string>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
enableLyricsTab()
|
||||||
|
}
|
||||||
|
|
||||||
|
function enableLyricsTab() {
|
||||||
tabs.lyrics.removeAttribute("disabled");
|
tabs.lyrics.removeAttribute("disabled");
|
||||||
tabs.lyrics.removeAttribute("aria-disabled");
|
tabs.lyrics.removeAttribute("aria-disabled");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#contents.genius-lyrics, .description {
|
.description {
|
||||||
font-size: 1.1vw !important;
|
font-size: 1.1vw !important;
|
||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user