Highlight segment on hover

This commit is contained in:
Ajay
2023-09-17 12:06:33 -04:00
parent 4954abf9e3
commit 8ab126f502
5 changed files with 28 additions and 3 deletions

View File

@@ -687,6 +687,8 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
: chrome.i18n.getMessage("skipSegment");
skipButton.addEventListener("click", () => skipSegment(actionType, UUID, skipButton));
votingButtons.addEventListener("dblclick", () => skipSegment(actionType, UUID));
votingButtons.addEventListener("dblclick", () => skipSegment(actionType, UUID));
votingButtons.addEventListener("mouseenter", () => selectSegment(UUID));
//add thumbs up, thumbs down and uuid copy buttons to the container
voteButtonsContainer.appendChild(upvoteButton);
@@ -718,6 +720,8 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
container.appendChild(votingButtons);
}
container.addEventListener("mouseleave", () => selectSegment(null));
}
function submitTimes() {
@@ -968,6 +972,13 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
}
}
function selectSegment(UUID: SegmentUUID | null): void {
sendTabMessage({
message: "selectSegment",
UUID: UUID
});
}
/**
* Should skipping be disabled (visuals stay)
*/