mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
Fixes the video-toggle being displayed at the wrong position on fullscreen
This commit is contained in:
@ -38,7 +38,7 @@ function setup(e) {
|
|||||||
player = $('ytmusic-player');
|
player = $('ytmusic-player');
|
||||||
video = $('video');
|
video = $('video');
|
||||||
|
|
||||||
$('#main-panel').append(switchButtonDiv);
|
$('#player').prepend(switchButtonDiv);
|
||||||
|
|
||||||
if (options.hideVideo) {
|
if (options.hideVideo) {
|
||||||
$('.video-switch-button-checkbox').checked = false;
|
$('.video-switch-button-checkbox').checked = false;
|
||||||
@ -48,6 +48,11 @@ function setup(e) {
|
|||||||
video.style.height = "auto";
|
video.style.height = "auto";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Prevents bubbling to the player which causes it to stop or resume
|
||||||
|
switchButtonDiv.addEventListener('click', (e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
});
|
||||||
|
|
||||||
// button checked = show video
|
// button checked = show video
|
||||||
switchButtonDiv.addEventListener('change', (e) => {
|
switchButtonDiv.addEventListener('change', (e) => {
|
||||||
options.hideVideo = !e.target.checked;
|
options.hideVideo = !e.target.checked;
|
||||||
|
|||||||
Reference in New Issue
Block a user