diff options
author | Ajay Ramachandran <[email protected]> | 2019-07-14 13:10:53 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2019-07-14 13:10:53 -0400 |
commit | 762039e2f65225d1ae0726679fb152ad28a1b73c (patch) | |
tree | beec5016432f106e90ab9ac344170ac3391cb95b | |
parent | a1d51656c50dd0288c1f915090fa0de54a3a49d5 (diff) | |
download | SponsorBlock-762039e2f65225d1ae0726679fb152ad28a1b73c.tar.gz SponsorBlock-762039e2f65225d1ae0726679fb152ad28a1b73c.zip |
Fixed sponsor getting added each time a video was loaded even though it's already in the player.
-rw-r--r-- | content.js | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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"; |