mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 21:47:06 +03:00
Made buttons on mobile not close the menu.
This commit is contained in:
@@ -866,7 +866,12 @@ function createButton(baseID, title, callback, imageName, isDraggable=false): bo
|
|||||||
newButton.style.padding = "0";
|
newButton.style.padding = "0";
|
||||||
}
|
}
|
||||||
newButton.setAttribute("title", chrome.i18n.getMessage(title));
|
newButton.setAttribute("title", chrome.i18n.getMessage(title));
|
||||||
newButton.addEventListener("click", callback);
|
newButton.addEventListener("click", (event: Event) => {
|
||||||
|
callback();
|
||||||
|
|
||||||
|
// Prevents the contols from closing when clicked
|
||||||
|
if (onMobileYouTube) event.stopPropagation();
|
||||||
|
});
|
||||||
|
|
||||||
// Image HTML
|
// Image HTML
|
||||||
let newButtonImage = document.createElement("img");
|
let newButtonImage = document.createElement("img");
|
||||||
|
|||||||
Reference in New Issue
Block a user