fix playback speed selector

replace querying for the text `Stats` (which is language specific)
with querying that the event origin is the button on the player-bar

fix #1045
This commit is contained in:
Araxeus
2023-02-28 19:49:39 +02:00
parent 7bdbab5a2d
commit 79e71dae26

View File

@ -30,7 +30,7 @@ const observePopupContainer = () => {
menu = getSongMenu();
}
if (menu && menu.lastElementChild.lastElementChild.innerText.startsWith('Stats') && !menu.contains(slider)) {
if (menu && menu.parentElement.eventSink_?.matches('ytmusic-menu-renderer.ytmusic-player-bar') && !menu.contains(slider)) {
menu.prepend(slider);
if (!observingSlider) {
setupSliderListener();