mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-14 07:27:05 +03:00
Fixed sponsor getting added each time a video was loaded even though it's already in the player.
This commit is contained in:
@@ -166,6 +166,11 @@ function goBackToPreviousTime() {
|
||||
|
||||
//Adds a sponsorship starts button to the player controls
|
||||
function addPlayerControlsButton() {
|
||||
if (document.getElementById("startSponsorButton") != null) {
|
||||
//it's already added
|
||||
return;
|
||||
}
|
||||
|
||||
let startSponsorButton = document.createElement("button");
|
||||
startSponsorButton.id = "startSponsorButton";
|
||||
startSponsorButton.className = "ytp-button";
|
||||
|
||||
Reference in New Issue
Block a user