From 8922c6cb679e4f02beb7ad401c2bfc4607a2432b Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 25 Jan 2022 19:51:06 -0500 Subject: [PATCH 1/4] Fix typo --- public/_locales/en/messages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index b1be0523..d375828c 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -438,7 +438,7 @@ "message": "The following submission is shorter than your minimum duration option. This could mean that this is already submitted, and just being ignored due to this option. Are you sure you would like to submit?" }, "liveOrPremiere": { - "message": "Submitting on an active livesteam or premiere is not allowed. Please wait until it finishes, then refresh the page and verify that the segments are still valid." + "message": "Submitting on an active livestream or premiere is not allowed. Please wait until it finishes, then refresh the page and verify that the segments are still valid." }, "showUploadButton": { "message": "Show Upload Button" From b02e4c1b4f286ce2323efda454b4a7af4c4fdf40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ron=20Hegymegi-Kiss?= Date: Wed, 26 Jan 2022 22:32:15 +0100 Subject: [PATCH 2/4] missing localization --- public/options/options.html | 2 +- src/content.ts | 2 +- src/utils.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/options/options.html b/public/options/options.html index 189f23ad..982ac361 100644 --- a/public/options/options.html +++ b/public/options/options.html @@ -2,7 +2,7 @@ - Options - SponsorBlock + __MSG_Options__ - SponsorBlock diff --git a/src/content.ts b/src/content.ts index b321df38..87894f7a 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1873,7 +1873,7 @@ function getSegmentsMessage(sponsorTimes: SponsorTime[]): string { let timeMessage = utils.getFormattedTime(sponsorTimes[i].segment[s]); //if this is an end time if (s == 1) { - timeMessage = " to " + timeMessage; + timeMessage = " " + chrome.i18n.getMessage("to") + " " + timeMessage; } else if (i > 0) { //add commas if necessary timeMessage = ", " + timeMessage; diff --git a/src/utils.ts b/src/utils.ts index e3c612bc..5b3c71dc 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -258,6 +258,8 @@ export default class Utils { localizeHtmlPage(): void { //Localize by replacing __MSG_***__ meta tags + const localizedMessage = this.getLocalizedMessage(document.title); + if (localizedMessage) document.title = localizedMessage; const objects = document.getElementsByClassName("sponsorBlockPageBody")[0].children; for (let j = 0; j < objects.length; j++) { const obj = objects[j]; From fa926ef686ceac300b802a088b7d8a3399506452 Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 27 Jan 2022 11:36:26 -0500 Subject: [PATCH 3/4] Don't hide exclusive access for min duration Fix #1156 --- src/content.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content.ts b/src/content.ts index 87894f7a..9952a9dd 100644 --- a/src/content.ts +++ b/src/content.ts @@ -728,8 +728,8 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) { // Hide all submissions smaller than the minimum duration if (Config.config.minDuration !== 0) { for (let i = 0; i < sponsorTimes.length; i++) { - if (sponsorTimes[i].segment[1] - sponsorTimes[i].segment[0] < Config.config.minDuration - && sponsorTimes[i].actionType !== ActionType.Poi) { + const duration = sponsorTimes[i].segment[1] - sponsorTimes[i].segment[0] ; + if (duration > 0 && duration < Config.config.minDuration) { sponsorTimes[i].hidden = SponsorHideType.MinimumDuration; } } From 1115ffd8cfd7e9f83e366162711d8fed159c36d2 Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 27 Jan 2022 11:57:14 -0500 Subject: [PATCH 4/4] Fix ugly long category pill titles FIx #1152 --- public/content.css | 1 + 1 file changed, 1 insertion(+) diff --git a/public/content.css b/public/content.css index 35b82766..6f121e84 100644 --- a/public/content.css +++ b/public/content.css @@ -628,6 +628,7 @@ input::-webkit-inner-spin-button { font-size: 75%; height: 100%; align-items: center; + inline-size: max-content; } .sponsorBlockCategoryPillTitleSection {