diff --git a/src/content.ts b/src/content.ts index ead25383..7acf45c6 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1026,18 +1026,10 @@ function createButton(baseID, title, callback, imageName, isDraggable=false): bo newButton.draggable = isDraggable; newButton.id = baseID + "Button"; newButton.classList.add("playerButton"); - if (!onMobileYouTube) { - newButton.classList.add("ytp-button"); - } else { - newButton.classList.add("icon-button"); - newButton.style.padding = "0"; - } + newButton.classList.add("ytp-button"); newButton.setAttribute("title", chrome.i18n.getMessage(title)); newButton.addEventListener("click", (event: Event) => { callback(); - - // Prevents the contols from closing when clicked - if (onMobileYouTube) event.stopPropagation(); }); // Image HTML @@ -1079,6 +1071,8 @@ function getControls(): HTMLElement | boolean { //adds all the player controls buttons async function createButtons(): Promise { + if (onMobileYouTube) return; + let result = await utils.wait(getControls).catch(); //set global controls variable