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": {
|
"copyPublicID": {
|
||||||
"message": "Copy Public UserID"
|
"message": "Copy Public UserID"
|
||||||
},
|
},
|
||||||
|
"copySegmentID": {
|
||||||
|
"message": "Copy Segment ID"
|
||||||
|
},
|
||||||
"discordAdvert": {
|
"discordAdvert": {
|
||||||
"message": "Come join the official discord server to give suggestions and feedback!"
|
"message": "Come join the official discord server to give suggestions and feedback!"
|
||||||
},
|
},
|
||||||
@@ -867,18 +870,27 @@
|
|||||||
"CopyDownvoteButtonInfo": {
|
"CopyDownvoteButtonInfo": {
|
||||||
"message": "Downvotes and creates a local copy for you to resubmit"
|
"message": "Downvotes and creates a local copy for you to resubmit"
|
||||||
},
|
},
|
||||||
"OpenCategoryWikiPage": {
|
"OpenCategoryWikiPage": {
|
||||||
"message": "Open this category's wiki page."
|
"message": "Open this category's wiki page."
|
||||||
},
|
},
|
||||||
"CopyAndDownvote": {
|
"CopyAndDownvote": {
|
||||||
"message": "Copy and downvote"
|
"message": "Copy and downvote"
|
||||||
},
|
},
|
||||||
"ContinueVoting": {
|
"ContinueVoting": {
|
||||||
"message": "Continue Voting"
|
"message": "Continue Voting"
|
||||||
},
|
},
|
||||||
"ChangeCategoryTooltip": {
|
"ChangeCategoryTooltip": {
|
||||||
"message": "This will instantly apply to your segments"
|
"message": "This will instantly apply to your segments"
|
||||||
},
|
},
|
||||||
|
"downvote": {
|
||||||
|
"message": "Downvote"
|
||||||
|
},
|
||||||
|
"upvote": {
|
||||||
|
"message": "Upvote"
|
||||||
|
},
|
||||||
|
"hideSegment": {
|
||||||
|
"message": "Hide segment"
|
||||||
|
},
|
||||||
"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."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -451,12 +451,14 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
|||||||
const upvoteButton = document.createElement("img");
|
const upvoteButton = document.createElement("img");
|
||||||
upvoteButton.id = "sponsorTimesUpvoteButtonsContainer" + UUID;
|
upvoteButton.id = "sponsorTimesUpvoteButtonsContainer" + UUID;
|
||||||
upvoteButton.className = "voteButton";
|
upvoteButton.className = "voteButton";
|
||||||
|
upvoteButton.title = chrome.i18n.getMessage("upvote");
|
||||||
upvoteButton.src = chrome.runtime.getURL("icons/thumbs_up.svg");
|
upvoteButton.src = chrome.runtime.getURL("icons/thumbs_up.svg");
|
||||||
upvoteButton.addEventListener("click", () => vote(1, UUID));
|
upvoteButton.addEventListener("click", () => vote(1, UUID));
|
||||||
|
|
||||||
const downvoteButton = document.createElement("img");
|
const downvoteButton = document.createElement("img");
|
||||||
downvoteButton.id = "sponsorTimesDownvoteButtonsContainer" + UUID;
|
downvoteButton.id = "sponsorTimesDownvoteButtonsContainer" + UUID;
|
||||||
downvoteButton.className = "voteButton";
|
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.src = locked && isVip ? chrome.runtime.getURL("icons/thumbs_down_locked.svg") : chrome.runtime.getURL("icons/thumbs_down.svg");
|
||||||
downvoteButton.addEventListener("click", () => vote(0, UUID));
|
downvoteButton.addEventListener("click", () => vote(0, UUID));
|
||||||
|
|
||||||
@@ -464,6 +466,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
|||||||
uuidButton.id = "sponsorTimesCopyUUIDButtonContainer" + UUID;
|
uuidButton.id = "sponsorTimesCopyUUIDButtonContainer" + UUID;
|
||||||
uuidButton.className = "voteButton";
|
uuidButton.className = "voteButton";
|
||||||
uuidButton.src = chrome.runtime.getURL("icons/clipboard.svg");
|
uuidButton.src = chrome.runtime.getURL("icons/clipboard.svg");
|
||||||
|
uuidButton.title = chrome.i18n.getMessage("copySegmentID");
|
||||||
uuidButton.addEventListener("click", () => {
|
uuidButton.addEventListener("click", () => {
|
||||||
navigator.clipboard.writeText(UUID);
|
navigator.clipboard.writeText(UUID);
|
||||||
const stopAnimation = AnimationUtils.applyLoadingAnimation(uuidButton, 0.3);
|
const stopAnimation = AnimationUtils.applyLoadingAnimation(uuidButton, 0.3);
|
||||||
@@ -473,6 +476,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
|||||||
const hideButton = document.createElement("img");
|
const hideButton = document.createElement("img");
|
||||||
hideButton.id = "sponsorTimesCopyUUIDButtonContainer" + UUID;
|
hideButton.id = "sponsorTimesCopyUUIDButtonContainer" + UUID;
|
||||||
hideButton.className = "voteButton";
|
hideButton.className = "voteButton";
|
||||||
|
hideButton.title = chrome.i18n.getMessage("hideSegment");
|
||||||
if (segmentTimes[i].hidden === SponsorHideType.Hidden) {
|
if (segmentTimes[i].hidden === SponsorHideType.Hidden) {
|
||||||
hideButton.src = chrome.runtime.getURL("icons/not_visible.svg");
|
hideButton.src = chrome.runtime.getURL("icons/not_visible.svg");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user