diff options
author | Ajay Ramachandran <[email protected]> | 2021-05-22 23:07:57 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2021-05-22 23:07:57 -0400 |
commit | f6bbb1f2af0986ef8657176a71df91749f7e9dc9 (patch) | |
tree | a6267b189ce301cde172c5f02d6f2fd11a32b6af | |
parent | 60c0af2ae7bd6db6fdc5f65ff5b4c88e17bebe54 (diff) | |
download | SponsorBlock-f6bbb1f2af0986ef8657176a71df91749f7e9dc9.tar.gz SponsorBlock-f6bbb1f2af0986ef8657176a71df91749f7e9dc9.zip |
Remove sponsor from element id
-rw-r--r-- | src/content.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/content.ts b/src/content.ts index 11c77599..e86d3171 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1081,8 +1081,8 @@ async function createButtons(): Promise<void> { controls = await utils.wait(getControls).catch(); // Add button if does not already exist in html - createButton("startSponsor", "sponsorStart", () => closeInfoMenuAnd(() => startOrEndTimingNewSegment()), "PlayerStartIconSponsorBlocker.svg"); - createButton("cancelSponsor", "sponsorCancel", () => closeInfoMenuAnd(() => cancelCreatingSegment()), "PlayerCancelSegmentIconSponsorBlocker.svg"); + createButton("startSegment", "sponsorStart", () => closeInfoMenuAnd(() => startOrEndTimingNewSegment()), "PlayerStartIconSponsorBlocker.svg"); + createButton("cancelSegment", "sponsorCancel", () => closeInfoMenuAnd(() => cancelCreatingSegment()), "PlayerCancelSegmentIconSponsorBlocker.svg"); createButton("info", "openPopup", openInfoMenu, "PlayerInfoIconSponsorBlocker.svg"); createButton("delete", "clearTimes", () => closeInfoMenuAnd(() => clearSponsorTimes()), "PlayerDeleteIconSponsorBlocker.svg"); createButton("submit", "SubmitTimes", submitSponsorTimes, "PlayerUploadIconSponsorBlocker.svg"); @@ -1128,16 +1128,16 @@ function updateEditButtonsOnPlayer(): void { } // Update the elements - playerButtons.startSponsor.button.style.display = buttonsEnabled ? "unset" : "none"; - playerButtons.cancelSponsor.button.style.display = buttonsEnabled && creatingSegment ? "unset" : "none"; + playerButtons.startSegment.button.style.display = buttonsEnabled ? "unset" : "none"; + playerButtons.cancelSegment.button.style.display = buttonsEnabled && creatingSegment ? "unset" : "none"; if (buttonsEnabled) { if (creatingSegment) { - playerButtons.startSponsor.image.src = chrome.extension.getURL("icons/PlayerStopIconSponsorBlocker.svg"); - playerButtons.startSponsor.button.setAttribute("title", chrome.i18n.getMessage("sponsorEnd")); + playerButtons.startSegment.image.src = chrome.extension.getURL("icons/PlayerStopIconSponsorBlocker.svg"); + playerButtons.startSegment.button.setAttribute("title", chrome.i18n.getMessage("sponsorEnd")); } else { - playerButtons.startSponsor.image.src = chrome.extension.getURL("icons/PlayerStartIconSponsorBlocker.svg"); - playerButtons.startSponsor.button.setAttribute("title", chrome.i18n.getMessage("sponsorStart")); + playerButtons.startSegment.image.src = chrome.extension.getURL("icons/PlayerStartIconSponsorBlocker.svg"); + playerButtons.startSegment.button.setAttribute("title", chrome.i18n.getMessage("sponsorStart")); } } |