Fix download/speed menu item

This commit is contained in:
TC
2021-03-04 21:29:37 +01:00
parent 5641c3fc87
commit 796a7aaaf1
4 changed files with 30 additions and 39 deletions

View File

@ -1,4 +1,7 @@
const { watchDOMElement } = require("../../providers/dom-elements");
const {
getSongMenu,
watchDOMElement,
} = require("../../providers/dom-elements");
const { ElementFromFile, templatePath } = require("../utils");
const slider = ElementFromFile(templatePath(__dirname, "slider.html"));
@ -49,8 +52,7 @@ module.exports = () => {
watchDOMElement(
"menu",
(document) =>
document.querySelector("ytmusic-menu-popup-renderer paper-listbox"),
(document) => getSongMenu(document),
(menuElement) => {
if (!menuElement.contains(slider)) {
menuElement.prepend(slider);