Skip to content

Commit

Permalink
Support for custom font size
Browse files Browse the repository at this point in the history
  • Loading branch information
cvzi committed Nov 18, 2023
1 parent 891990f commit abbc4e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions YoutubeMusicGeniusLyrics.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// @author cuzi
// @icon https://music.youtube.com/img/favicon_144.png
// @supportURL https://github.com/cvzi/Youtube-Music-Genius-Lyrics-userscript/issues
// @version 4.0.20
// @version 4.0.21
// @require https://greasyfork.org/scripts/406698-geniuslyrics/code/GeniusLyrics.js
// @grant GM.xmlHttpRequest
// @grant GM.setValue
Expand Down Expand Up @@ -276,7 +276,7 @@ function addLyrics (force, beLessSpecific) {
let songTitle = titleNode.textContent
const songArtistsArr = Array.from(artistNodes).map(e => e.textContent)

const song = songArtistsArr.join(', ') + ' - ' + songTitle + '#' + genius.option.themeKey + '@' + lyricsWidth
const song = `${songArtistsArr.join(', ')}-${songTitle}#${genius.option.themeKey}@${genius.option.fontSize}@${lyricsWidth}`

if (lastSong === song && document.getElementById('lyricscontainer')) {
// Same video id and same theme and lyrics are showing -> stop here
Expand Down Expand Up @@ -363,7 +363,7 @@ function showSearchField (query) {
}
})
input.addEventListener('keyup', function onSearchLyricsKeyUp (ev) {
if (ev.keyCode === 13) {
if (ev.code === 'Enter' || ev.code === 'NumpadEnter') {
ev.preventDefault()
if (input.value) {
genius.f.searchByQuery(input.value, b)
Expand Down

0 comments on commit abbc4e9

Please sign in to comment.