mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-13 06:57:09 +03:00
Highlight segment on hover
This commit is contained in:
11
src/popup.ts
11
src/popup.ts
@@ -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)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user