diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index 4a7e354f..5b01382c 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -34,8 +34,8 @@ export interface SponsorTimeEditState { const DEFAULT_CATEGORY = "chooseACategory"; -const categoryNames = CompileConfig.categoryList.filter((name) => name !== "chapter") - .map((name) => chrome.i18n.getMessage("category_" + name)); +const categoryNamesGrams: string[] = [].concat(...CompileConfig.categoryList.filter((name) => name !== "chapter") + .map((name) => chrome.i18n.getMessage("category_" + name).split(/\/|\s|-/))); class SponsorTimeEditComponent extends React.Component { @@ -389,7 +389,7 @@ class SponsorTimeEditComponent extends React.Component sponsorTime.description.toLowerCase().includes(category.toLowerCase()))) { if (this.showToolTip(chrome.i18n.getMessage("chapterNameTooltipWarning"), "chapterWarning")) { this.categoryNameWarningShown = true;