Skip to content

Commit

Permalink
Update youtube-player.js
Browse files Browse the repository at this point in the history
  • Loading branch information
firofame authored Jul 6, 2024
1 parent 71ded56 commit 99f44c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion youtube-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ fetch('playlist.json')
const buttonContainer = document.getElementById('button-container');
data.forEach(channel => {
const button = document.createElement('button');
button.dataset.channel = channel.channel_id;
button.textContent = channel.channel_name;
button.addEventListener('click', () => changeChannel(channel.channel_id));
buttonContainer.appendChild(button);
});
});
});

0 comments on commit 99f44c0

Please sign in to comment.