mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Add tooltips to vote buttons in popup
This commit is contained in:
@@ -164,6 +164,9 @@
|
||||
"copyPublicID": {
|
||||
"message": "Copy Public UserID"
|
||||
},
|
||||
"copySegmentID": {
|
||||
"message": "Copy Segment ID"
|
||||
},
|
||||
"discordAdvert": {
|
||||
"message": "Come join the official discord server to give suggestions and feedback!"
|
||||
},
|
||||
@@ -879,6 +882,15 @@
|
||||
"ChangeCategoryTooltip": {
|
||||
"message": "This will instantly apply to your segments"
|
||||
},
|
||||
"downvote": {
|
||||
"message": "Downvote"
|
||||
},
|
||||
"upvote": {
|
||||
"message": "Upvote"
|
||||
},
|
||||
"hideSegment": {
|
||||
"message": "Hide segment"
|
||||
},
|
||||
"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."
|
||||
},
|
||||
|
||||
@@ -451,12 +451,14 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
||||
const upvoteButton = document.createElement("img");
|
||||
upvoteButton.id = "sponsorTimesUpvoteButtonsContainer" + UUID;
|
||||
upvoteButton.className = "voteButton";
|
||||
upvoteButton.title = chrome.i18n.getMessage("upvote");
|
||||
upvoteButton.src = chrome.runtime.getURL("icons/thumbs_up.svg");
|
||||
upvoteButton.addEventListener("click", () => vote(1, UUID));
|
||||
|
||||
const downvoteButton = document.createElement("img");
|
||||
downvoteButton.id = "sponsorTimesDownvoteButtonsContainer" + UUID;
|
||||
downvoteButton.className = "voteButton";
|
||||
downvoteButton.title = chrome.i18n.getMessage("downvote");
|
||||
downvoteButton.src = locked && isVip ? chrome.runtime.getURL("icons/thumbs_down_locked.svg") : chrome.runtime.getURL("icons/thumbs_down.svg");
|
||||
downvoteButton.addEventListener("click", () => vote(0, UUID));
|
||||
|
||||
@@ -464,6 +466,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
||||
uuidButton.id = "sponsorTimesCopyUUIDButtonContainer" + UUID;
|
||||
uuidButton.className = "voteButton";
|
||||
uuidButton.src = chrome.runtime.getURL("icons/clipboard.svg");
|
||||
uuidButton.title = chrome.i18n.getMessage("copySegmentID");
|
||||
uuidButton.addEventListener("click", () => {
|
||||
navigator.clipboard.writeText(UUID);
|
||||
const stopAnimation = AnimationUtils.applyLoadingAnimation(uuidButton, 0.3);
|
||||
@@ -473,6 +476,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
||||
const hideButton = document.createElement("img");
|
||||
hideButton.id = "sponsorTimesCopyUUIDButtonContainer" + UUID;
|
||||
hideButton.className = "voteButton";
|
||||
hideButton.title = chrome.i18n.getMessage("hideSegment");
|
||||
if (segmentTimes[i].hidden === SponsorHideType.Hidden) {
|
||||
hideButton.src = chrome.runtime.getURL("icons/not_visible.svg");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user