diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 16f9e266..51eceee8 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -517,7 +517,7 @@ "message": "Music: Non-Music Section" }, "category_music_offtopic_description": { - "message": "Only for use in music videos. This includes introductions or outros in music videos." + "message": "Only for use in music videos. This only should be used for sections of music videos that aren't already covered by another category." }, "category_music_offtopic_short": { "message": "Non-Music" diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index b4f31932..01b2a15e 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -127,7 +127,7 @@ class SkipNoticeComponent extends React.Component sponsorsLookup(id), 5000 + Math.random() * 15000); + setTimeout(() => sponsorsLookup(id), 5000 + Math.random() * 15000 + 5000 * sponsorLookupRetries); sponsorLookupRetries++; } @@ -1281,7 +1281,7 @@ function openInfoMenu() { const settings = popup.querySelector("#sbPopupIconSettings"); const edit = popup.querySelector("#sbPopupIconEdit"); const check = popup.querySelector("#sbPopupIconCheck"); - logo.src = chrome.extension.getURL("icons/LogoSponsorBlocker256px.png"); + logo.src = chrome.extension.getURL("icons/IconSponsorBlocker256px.png"); settings.src = chrome.extension.getURL("icons/settings.svg"); edit.src = chrome.extension.getURL("icons/pencil.svg"); check.src = chrome.extension.getURL("icons/check.svg"); diff --git a/src/popup.ts b/src/popup.ts index f28589a7..347678f3 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -396,7 +396,7 @@ async function runThePopup(messageListener?: MessageListener): Promise { extraInfo = " (" + chrome.i18n.getMessage("hiddenDueToDuration") + ")"; } - sponsorTimeButton.innerText = prefix + getFormattedTime(segmentTimes[i].segment[0]) + " " + chrome.i18n.getMessage("to") + " " + getFormattedTime(segmentTimes[i].segment[1]) + extraInfo; + sponsorTimeButton.innerText = prefix + utils.getFormattedTime(segmentTimes[i].segment[0], true) + " " + chrome.i18n.getMessage("to") + " " + utils.getFormattedTime(segmentTimes[i].segment[1], true) + extraInfo; const categoryColorCircle = document.createElement("span"); categoryColorCircle.id = "sponsorTimesCategoryColorCircle" + UUID; @@ -595,21 +595,6 @@ async function runThePopup(messageListener?: MessageListener): Promise { }); } - //converts time in seconds to minutes:seconds - function getFormattedTime(seconds) { - const minutes = Math.floor(seconds / 60); - const secondsDisplayNumber = Math.round(seconds - minutes * 60); - let secondsDisplay = String(secondsDisplayNumber); - if (secondsDisplayNumber < 10) { - //add a zero - secondsDisplay = "0" + secondsDisplay; - } - - const formatted = minutes + ":" + secondsDisplay; - - return formatted; - } - function whitelistChannel() { //get the channel url messageHandler.query({ diff --git a/src/utils.ts b/src/utils.ts index f45a5a1c..7658cab0 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -290,7 +290,7 @@ class Utils { let errorMessage = ""; const postFix = (responseText ? "\n\n" + responseText : ""); - if([400, 429, 409, 502, 0].includes(statusCode)) { + if([400, 429, 409, 502, 503, 0].includes(statusCode)) { //treat them the same if (statusCode == 503) statusCode = 502;