mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 21:47:06 +03:00
Remove submitting on mobile
This commit is contained in:
@@ -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<boolean> {
|
||||
if (onMobileYouTube) return;
|
||||
|
||||
let result = await utils.wait(getControls).catch();
|
||||
|
||||
//set global controls variable
|
||||
|
||||
Reference in New Issue
Block a user