diff --git a/public/content.css b/public/content.css index 52df956f..4751d293 100644 --- a/public/content.css +++ b/public/content.css @@ -561,7 +561,7 @@ input::-webkit-inner-spin-button { border-color: rgba(28, 28, 28, 0.7) transparent transparent transparent; } -.SponsorBlockLockedColor { +.sponsorBlockLockedColor { color: #ffc83d; } diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index f83f72c4..6d3c378b 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -252,7 +252,7 @@ class SkipNoticeComponent extends React.Component - {this.state.thanksForVotingText} + {this.state.thanksForVotingText} {/* Continue Voting Button */} @@ -370,8 +370,8 @@ class SkipNoticeComponent extends React.Component this.performAction(i)} key={"submission" + i + this.segments[i].category + this.idSuffix}> {(i + 1) + ". " + chrome.i18n.getMessage("category_" + this.segments[i].category)} @@ -381,21 +381,23 @@ class SkipNoticeComponent extends React.Component - + + + className={this.getCategoryNameClass(category)}> {chrome.i18n.getMessage("category_" + category)} ); @@ -563,8 +574,8 @@ class SkipNoticeComponent extends React.Component window.open(wikiLinkText), chrome.i18n.getMessage("OpenCategoryWikiPage")); - this.setState({ - voted: utils.replaceArrayElement(this.state.voted, SkipNoticeAction.Downvote, index) - }); + voted[index] = SkipNoticeAction.Downvote; break; case 1: - this.setState({ - voted: utils.replaceArrayElement(this.state.voted, SkipNoticeAction.Upvote, index) - }); - + voted[index] = SkipNoticeAction.Upvote; break; case 20: - this.setState({ - voted: utils.replaceArrayElement(this.state.voted, SkipNoticeAction.None, index) - }); - + voted[index] = SkipNoticeAction.None; break; } + this.setState({ + voted + }); + this.addVoteButtonInfo(chrome.i18n.getMessage("voted")); // Change the sponsor locally @@ -715,16 +723,13 @@ class SkipNoticeComponent extends React.Component): void { diff --git a/src/content.ts b/src/content.ts index 760baa7c..7eeed429 100644 --- a/src/content.ts +++ b/src/content.ts @@ -765,7 +765,7 @@ function lookupVipInformation(id: string): void { if (isVip) { lockedCategoriesLookup(id); } - }) + }); } async function updateVipInfo(): Promise { diff --git a/src/utils.ts b/src/utils.ts index 6dacf325..99d61137 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -539,9 +539,4 @@ export default class Utils { return hashHex; } - - replaceArrayElement(array: Type[], value: Type, index: number): Type[] { - array[index] = value; - return array; - } }