mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-18 13:42:06 +00:00
Merge pull request #671 from Araxeus/lyrics]-fix-part-of-lyrics-is-missing
Fix lyrics genius missing parts
This commit is contained in:
@ -36,15 +36,10 @@ module.exports = () => {
|
|||||||
|
|
||||||
const wrapper = document.createElement("div");
|
const wrapper = document.createElement("div");
|
||||||
wrapper.innerHTML = html;
|
wrapper.innerHTML = html;
|
||||||
const lyricsSelector1 = wrapper.querySelector(".lyrics");
|
|
||||||
const lyricsSelector2 = wrapper.querySelector(
|
const lyrics = [...wrapper.querySelectorAll('[class^="Lyrics__Container"]')].map(d => d.innerHTML).join('<br>')
|
||||||
'[class^="Lyrics__Container"]'
|
|| wrapper.querySelector(".lyrics")?.innerHTML;
|
||||||
);
|
|
||||||
const lyrics = lyricsSelector1
|
|
||||||
? lyricsSelector1.innerHTML
|
|
||||||
: lyricsSelector2
|
|
||||||
? lyricsSelector2.innerHTML
|
|
||||||
: null;
|
|
||||||
if (!lyrics) {
|
if (!lyrics) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user