diff --git a/public/content.css b/public/content.css index f9a6aab6..785b122e 100644 --- a/public/content.css +++ b/public/content.css @@ -559,4 +559,8 @@ input::-webkit-inner-spin-button { border-width: 15px; border-style: solid; border-color: rgba(28, 28, 28, 0.7) transparent transparent transparent; +} + +.SponsorBlockLockedColor { + color: #ffc83d; } \ No newline at end of file diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index eaca2b42..0f24b7df 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -557,16 +557,17 @@ class SkipNoticeComponent extends React.Component - {this.categoryVoteButtonLockIcon(category) + chrome.i18n.getMessage("category_" + category)} + key={category} + className={this.categoryLockedClass(category)}> + {chrome.i18n.getMessage("category_" + category)} ); } return elements; } - categoryVoteButtonLockIcon(category: Category): string { - return (this.contentContainer().lockedCategories.includes(category)) ? "🔒" : " "; + categoryLockedClass(category: string): string { + return(this.props.contentContainer().lockedCategories.includes(category)) ? "SponsorBlockLockedColor" : "" } unskip(index: number): void { diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index a4422703..83e526dc 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -23,6 +23,7 @@ export interface SponsorTimeEditProps { export interface SponsorTimeEditState { editing: boolean; sponsorTimeEdits: [string, string]; + selectedCategory: Category; } const DEFAULT_CATEGORY = "chooseACategory"; @@ -46,7 +47,8 @@ class SponsorTimeEditComponent extends React.Component + key={category} + className={this.categoryLockedClass(category)}> {chrome.i18n.getMessage("category_" + category)} ); @@ -260,6 +263,10 @@ class SponsorTimeEditComponent extends React.Component): void { // See if show more categories was pressed if (event.target.value !== DEFAULT_CATEGORY && !Config.config.categorySelections.some((category) => category.name === event.target.value)) { diff --git a/src/content.ts b/src/content.ts index 3ba015ee..2f37cf01 100644 --- a/src/content.ts +++ b/src/content.ts @@ -755,6 +755,11 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) { sponsorLookupRetries++; } + + getVipSegmentsWarnings(id); +} + +function getVipSegmentsWarnings(id: string): void { // Look up locked status if the user is a vip isVipLookup(); const isVip = Config.config.isVip; @@ -767,7 +772,7 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) { async function isVipLookup() { const currentTime = Date.now(); const lastUpdate = Config.config.lastIsVipUpdate; - if (currentTime - lastUpdate > 1000*60*60*24) { //max every 24 hours 1000*60*60*24 + if (currentTime - lastUpdate > 1) { //max every 24 hours 1000*60*60*24 Config.config.lastIsVipUpdate = currentTime; utils.sendRequestToServer("GET", "/api/isUserVIP?userID=" + Config.config.userID, (response) => {