diff options
author | Official Noob <[email protected]> | 2019-08-22 19:39:17 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-08-22 19:39:17 +0100 |
commit | d5999ad330efd54cf092af9049294d03141a1cd2 (patch) | |
tree | 0911357a3dae1a502c15d9b6aab045bb0c6028c5 | |
parent | 146ece3bff098ed47b2e23f4f949597b6bf19de1 (diff) | |
download | SponsorBlock-d5999ad330efd54cf092af9049294d03141a1cd2.tar.gz SponsorBlock-d5999ad330efd54cf092af9049294d03141a1cd2.zip |
Added isDraggable
-rw-r--r-- | content.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -538,16 +538,18 @@ function removePlayerControlsButton() { document.getElementById("submitButton").style.display = "none"; } -function createButton(baseID, title, callback, imageName) { +function createButton(baseID, title, callback, imageName, isDraggable=false) { if (document.getElementById(baseID+"Button") != null) return; // Button HTML let newButton = document.createElement("button"); + newButton.draggable = isDraggable; newButton.id = baseID+"Button"; newButton.className = "ytp-button playerButton"; newButton.setAttribute("title", chrome.i18n.getMessage(title)); newButton.addEventListener("click", callback); // Image HTML let newButtonImage = document.createElement("img"); + newButton.draggable = isDraggable; newButtonImage.id = baseID+"Image"; newButtonImage.className = "playerButtonImage"; newButtonImage.src = chrome.extension.getURL("icons/"+imageName); |