diff options
author | Ajay Ramachandran <[email protected]> | 2020-07-03 21:20:53 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-03 21:20:53 -0400 |
commit | fad3284c4f52c8af4e1aa125cf680e6170bccfeb (patch) | |
tree | 1cda05f453d96631d516833ce6ae3a0ab5c30827 /src/js-components/previewBar.ts | |
parent | dd4c903c6a9e1496fed346258a97308a8a34c3fa (diff) | |
parent | c69047c7f9d801f94914f2ef498fdd30b688d944 (diff) | |
download | SponsorBlock-fad3284c4f52c8af4e1aa125cf680e6170bccfeb.tar.gz SponsorBlock-fad3284c4f52c8af4e1aa125cf680e6170bccfeb.zip |
Merge pull request #399 from ajayyy/react2.0.3
Save category in preview submissions and other fixes
Diffstat (limited to 'src/js-components/previewBar.ts')
-rw-r--r-- | src/js-components/previewBar.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index e0931d91..bef397c1 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -6,6 +6,8 @@ 'use strict'; import Config from "../config"; +import Utils from "../utils"; +let utils = new Utils(); class PreviewBar { container: HTMLUListElement; @@ -79,8 +81,8 @@ class PreviewBar { tooltipTextWrapper.classList.remove("sbTooltipOneTitleThumbnailOffset"); } else if (category !== null) { categoryTooltip.classList.remove("sbHidden"); - categoryTooltip.textContent = chrome.i18n.getMessage("category_" + category) - || (chrome.i18n.getMessage("preview") + " " + chrome.i18n.getMessage("category_" + category.split("preview-")[1])); + categoryTooltip.textContent = utils.shortCategoryName(category) + || (chrome.i18n.getMessage("preview") + " " + utils.shortCategoryName(category.split("preview-")[1])); // There is a title now tooltip.classList.remove("ytp-tooltip-text-no-title"); |