Add tooltip to skip segment button

This commit is contained in:
Ajay
2022-09-24 22:33:12 -04:00
parent da35e889f2
commit 280127c9af
2 changed files with 8 additions and 0 deletions

View File

@@ -1049,6 +1049,12 @@
"hideSegment": { "hideSegment": {
"message": "Hide segment" "message": "Hide segment"
}, },
"skipSegment": {
"message": "Skip segment"
},
"playChapter": {
"message": "Play chapter"
},
"SponsorTimeEditScrollNewFeature": { "SponsorTimeEditScrollNewFeature": {
"message": "Use your mousewheel while hovering over the edit box to quickly adjust the time. Combinations of the ctrl or shift key can be used to fine tune the changes." "message": "Use your mousewheel while hovering over the edit box to quickly adjust the time. Combinations of the ctrl or shift key can be used to fine tune the changes."
}, },

View File

@@ -674,6 +674,8 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
skipButton.id = "sponsorTimesSkipButtonContainer" + UUID; skipButton.id = "sponsorTimesSkipButtonContainer" + UUID;
skipButton.className = "voteButton"; skipButton.className = "voteButton";
skipButton.src = chrome.runtime.getURL("icons/skip.svg"); skipButton.src = chrome.runtime.getURL("icons/skip.svg");
skipButton.title = actionType === ActionType.Chapter ? chrome.i18n.getMessage("playChapter")
: chrome.i18n.getMessage("skipSegment");
skipButton.addEventListener("click", () => skipSegment(actionType, UUID, skipButton)); skipButton.addEventListener("click", () => skipSegment(actionType, UUID, skipButton));
votingButtons.addEventListener("dblclick", () => skipSegment(actionType, UUID)); votingButtons.addEventListener("dblclick", () => skipSegment(actionType, UUID));