From 93f02877a72288dd369fd852711eedbc0c96d38f Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Wed, 6 Oct 2021 08:15:15 +0200 Subject: [PATCH 01/36] copy segments basics done --- src/components/SkipNoticeComponent.tsx | 83 ++++++++++++++++---------- src/config.ts | 8 +++ src/content.ts | 7 ++- 3 files changed, 66 insertions(+), 32 deletions(-) diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 4a515270..fefa5040 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -4,6 +4,7 @@ import Config from "../config" import { Category, ContentContainer, CategoryActionType, SponsorHideType, SponsorTime, NoticeVisbilityMode, ActionType } from "../types"; import NoticeComponent from "./NoticeComponent"; import NoticeTextSelectionComponent from "./NoticeTextSectionComponent"; +import SubmissionNotice from "../render/SubmissionNotice"; import { getCategoryActionType, getSkippingText } from "../utils/categoryUtils"; @@ -12,6 +13,7 @@ export enum SkipNoticeAction { Upvote, Downvote, CategoryVote, + CopyDownvote, Unskip } @@ -203,12 +205,20 @@ class SkipNoticeComponent extends React.Component this.adjustDownvotingState(true)}> + {/* Copy and Downvote Button */} + this.prepAction(SkipNoticeAction.CopyDownvote)}> + : @@ -340,16 +350,6 @@ class SkipNoticeComponent extends React.Component this.forceUpdate(); - Config.configListeners.push(this.configListener); - this.setState({ choosingCategory: true, downvoting: false @@ -531,6 +536,24 @@ class SkipNoticeComponent extends React.Component unknown, ...messages: string[]): void { this.setState({ messages, @@ -557,7 +580,7 @@ class SkipNoticeComponent extends React.Component extends Map { this.update(); return result; } + + addArray(key: T, value: U) { + // Expand an array by value + let result = super.get(key).concat(value); + this.set(key, result); + this.update(); + return result; + } delete(key) { const result = super.delete(key); diff --git a/src/content.ts b/src/content.ts index 89e78938..b2ea4342 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1682,8 +1682,11 @@ function resetSponsorSubmissionNotice() { } function submitSponsorTimes() { - if (submissionNotice !== null) return; - + if (submissionNotice !== null){ + submissionNotice.noticeElement.style.display = (submissionNotice.noticeElement.style.display === "none") ? null : "none"; + return; + } + if (sponsorTimesSubmitting !== undefined && sponsorTimesSubmitting.length > 0) { submissionNotice = new SubmissionNotice(skipNoticeContentContainer, sendSubmitMessage); } From 84924b636475167b30c054ca2cb2db1b11661e5a Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Wed, 6 Oct 2021 08:29:45 +0200 Subject: [PATCH 02/36] Update SkipNoticeComponent.tsx --- src/components/SkipNoticeComponent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index fefa5040..eca8ee23 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -545,7 +545,7 @@ class SkipNoticeComponent extends React.Component Date: Wed, 6 Oct 2021 08:31:18 +0200 Subject: [PATCH 03/36] Update config.ts --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index b1fc1070..8390b393 100644 --- a/src/config.ts +++ b/src/config.ts @@ -123,7 +123,7 @@ class SBMap extends Map { addArray(key: T, value: U) { // Expand an array by value - let result = super.get(key).concat(value); + const result = super.get(key).concat(value); this.set(key, result); this.update(); return result; From 988905c15500e22c28bfb8c3cfe48708ae848023 Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Wed, 6 Oct 2021 16:33:11 +0200 Subject: [PATCH 04/36] Update config.ts --- src/config.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/config.ts b/src/config.ts index 8390b393..5d8a58e4 100644 --- a/src/config.ts +++ b/src/config.ts @@ -120,14 +120,6 @@ class SBMap extends Map { this.update(); return result; } - - addArray(key: T, value: U) { - // Expand an array by value - const result = super.get(key).concat(value); - this.set(key, result); - this.update(); - return result; - } delete(key) { const result = super.delete(key); From 4afc2c153a789454dfb3833694e43a2d24f97989 Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Wed, 6 Oct 2021 23:02:26 +0200 Subject: [PATCH 05/36] Restart Voting button. Wiki links. SkipNotice Improvements --- public/_locales/en/messages.json | 12 ++ src/components/SkipNoticeComponent.tsx | 171 ++++++++++++++++++------- src/config.ts | 24 ++-- 3 files changed, 154 insertions(+), 53 deletions(-) diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 5ec3f3e3..da70cd4e 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -810,5 +810,17 @@ }, "LearnMore": { "message": "Learn More" + }, + "CopyDownvoteButtonInfo": { + "message": "Downvotes and creates a local copy for you to resubmit" + }, + "OpenCategoryWikiPage": { + "message": "Open this category's wiki page." + }, + "CopyAndDownvote": { + "message": "Copy and downvote" + }, + "ContinueVoting": { + "message": "Continue Voting" } } diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index fefa5040..3ed421c6 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -45,7 +45,7 @@ export interface SkipNoticeState { skipButtonCallback?: (index: number) => void; showSkipButton?: boolean; - downvoting?: boolean; + editing?: boolean; choosingCategory?: boolean; thanksForVotingText?: string; //null until the voting buttons should be hidden @@ -117,7 +117,7 @@ class SkipNoticeComponent extends React.Component this.unskip(index), showSkipButton: true, - downvoting: false, + editing: false, choosingCategory: false, thanksForVotingText: null, @@ -208,16 +208,15 @@ class SkipNoticeComponent extends React.Component this.adjustDownvotingState(true)}> - + onClick={() => this.prepAction(SkipNoticeAction.Downvote)}> {/* Copy and Downvote Button */} this.prepAction(SkipNoticeAction.CopyDownvote)}> + title={chrome.i18n.getMessage("CopyDownvoteButtonInfo")} + src={chrome.extension.getURL("icons/pencil.svg")} + onClick={() => this.adjustEditingState(true)}> @@ -226,7 +225,17 @@ class SkipNoticeComponent extends React.Component + + {/* Submitted string */} {this.state.thanksForVotingText} + + {/* Continue Voting Button */} + } @@ -246,16 +255,16 @@ class SkipNoticeComponent extends React.Component), - /* Downvote Options Row */ - (this.state.downvoting && - - + - {/* Normal downvote */} + {/* Copy Segment */} {/* Category vote */} @@ -269,6 +278,8 @@ class SkipNoticeComponent extends React.Component ), + + /* Category Chooser Row */ (this.state.choosingCategory && { if (this.segments.length > 1) { // Use the action selectors as a submit button @@ -445,6 +531,15 @@ class SkipNoticeComponent extends React.Component window.open(wikiLinkText), chrome.i18n.getMessage("OpenCategoryWikiPage")); + this.setState({ + editing: false, + choosingCategory: false, + actionState: SkipNoticeAction.None + }); } // Change the sponsor locally @@ -536,24 +637,6 @@ class SkipNoticeComponent extends React.Component unknown, ...messages: string[]): void { this.setState({ messages, diff --git a/src/config.ts b/src/config.ts index b1fc1070..e8b64bf2 100644 --- a/src/config.ts +++ b/src/config.ts @@ -43,7 +43,8 @@ interface SBConfig { showDonationLink: boolean, autoHideInfoButton: boolean, autoSkipOnMusicVideos: boolean, - highlightCategoryUpdate: boolean + highlightCategoryUpdate: boolean, + wikiPages: SBMap // What categories should be skipped categorySelections: CategorySelection[], @@ -120,14 +121,6 @@ class SBMap extends Map { this.update(); return result; } - - addArray(key: T, value: U) { - // Expand an array by value - let result = super.get(key).concat(value); - this.set(key, result); - this.update(); - return result; - } delete(key) { const result = super.delete(key); @@ -205,6 +198,19 @@ const Config: SBObject = { option: CategorySkipOption.AutoSkip }], + wikiPages: new SBMap("wikiLinks", [ + ["sponsor", "https://wiki.sponsor.ajay.app/w/Sponsor"], + ["selfpromo", "https://wiki.sponsor.ajay.app/w/Unpaid/Self_Promotion"], + ["interaction", "https://wiki.sponsor.ajay.app/w/Interaction_Reminder_(Subscribe)"], + ["intro", "https://wiki.sponsor.ajay.app/w/Intermission/Intro_Animation"], + ["outro", "https://wiki.sponsor.ajay.app/w/Endcards/Credits"], + ["preview", "https://wiki.sponsor.ajay.app/w/Preview/Recap"], + ["music_offtopic", "https://wiki.sponsor.ajay.app/w/Music:_Non-Music_Section"], + ["highlight_poi", "https://wiki.sponsor.ajay.app/w/Highlight"], + ["guidelines", "https://wiki.sponsor.ajay.app/w/Guidelines"], + ["mute", "https://wiki.sponsor.ajay.app/w/Mute_Segment"], + ]), + // Preview bar barTypes: { "preview-chooseACategory": { From edd10117379969ab050cce74727f56da4738f53f Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Wed, 6 Oct 2021 23:13:10 +0200 Subject: [PATCH 06/36] margin in ContinueVoting --- src/components/SkipNoticeComponent.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 3ed421c6..fcb2f157 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -227,7 +227,9 @@ class SkipNoticeComponent extends React.Component {/* Submitted string */} + {this.state.thanksForVotingText} + {/* Continue Voting Button */} @@ -265,14 +269,15 @@ class SkipNoticeComponent extends React.Component this.prepAction(SkipNoticeAction.CopyDownvote)}> - {chrome.i18n.getMessage("CopyAndDownvote")} + {chrome.i18n.getMessage("CopyAndDownvote")} {/* Category vote */} diff --git a/src/config.ts b/src/config.ts index e8b64bf2..43345107 100644 --- a/src/config.ts +++ b/src/config.ts @@ -44,7 +44,8 @@ interface SBConfig { autoHideInfoButton: boolean, autoSkipOnMusicVideos: boolean, highlightCategoryUpdate: boolean, - wikiPages: SBMap + wikiPages: SBMap, + colorPalette: SBMap // What categories should be skipped categorySelections: CategorySelection[], @@ -211,6 +212,11 @@ const Config: SBObject = { ["mute", "https://wiki.sponsor.ajay.app/w/Mute_Segment"], ]), + colorPalette: new SBMap("colorPalette", [ + ["SponsorBlockRed", "#780303"], + ["SponsorBlockWhite", "#ffffff"] + ]), + // Preview bar barTypes: { "preview-chooseACategory": { diff --git a/src/svg-icons/pencil_svg.tsx b/src/svg-icons/pencil_svg.tsx new file mode 100644 index 00000000..866f908e --- /dev/null +++ b/src/svg-icons/pencil_svg.tsx @@ -0,0 +1,18 @@ +import * as React from "react"; + +const pencilSvg = ({ + fill = "#ffffff" +}) => ( + + + +); + +export default pencilSvg; diff --git a/src/svg-icons/thumbs_down_svg.tsx b/src/svg-icons/thumbs_down_svg.tsx new file mode 100644 index 00000000..4bb89d79 --- /dev/null +++ b/src/svg-icons/thumbs_down_svg.tsx @@ -0,0 +1,23 @@ +import * as React from "react"; + +const thumbsDownSvg = ({ + fill = "#ffffff" +}) => ( + + + + + +); + +export default thumbsDownSvg; diff --git a/src/svg-icons/thumbs_up_svg.tsx b/src/svg-icons/thumbs_up_svg.tsx new file mode 100644 index 00000000..8dd77c1c --- /dev/null +++ b/src/svg-icons/thumbs_up_svg.tsx @@ -0,0 +1,22 @@ +import * as React from "react"; + +const thumbsUpSvg = ({ + fill = "#ffffff" +}) => ( + + + + +); + +export default thumbsUpSvg; From 52ed4f73f4e252ea517ca4f1a8e0b0ff41c855f3 Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Sat, 9 Oct 2021 08:08:46 +0200 Subject: [PATCH 09/36] SkipNotice now remembers what has already been voted. Also nicer highlighting of current selection. --- src/components/SkipNoticeComponent.tsx | 142 +++++++++++++++++-------- src/utils.ts | 6 +- 2 files changed, 102 insertions(+), 46 deletions(-) diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index db0aca15..4fadcfb7 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -5,6 +5,8 @@ import { Category, ContentContainer, CategoryActionType, SponsorHideType, Sponso import NoticeComponent from "./NoticeComponent"; import NoticeTextSelectionComponent from "./NoticeTextSectionComponent"; import SubmissionNotice from "../render/SubmissionNotice"; +import Utils from "../utils"; +const utils = new Utils(); import { getCategoryActionType, getSkippingText } from "../utils/categoryUtils"; @@ -58,6 +60,10 @@ export interface SkipNoticeState { showKeybindHint?: boolean; smaller?: boolean; + + voted?: SkipNoticeAction[]; + copied?: SkipNoticeAction[]; + } class SkipNoticeComponent extends React.Component { @@ -75,6 +81,9 @@ class SkipNoticeComponent extends React.Component; categoryOptionRef: React.RefObject; + selectedColor: string; + unselectedColor: string; + // Used to update on config change configListener: () => void; @@ -106,6 +115,9 @@ class SkipNoticeComponent extends React.Component this.prepAction(SkipNoticeAction.Upvote)}> - + {/* Report Button */} @@ -211,17 +227,18 @@ class SkipNoticeComponent extends React.Component this.prepAction(SkipNoticeAction.Downvote)}> - + {/* Copy and Downvote Button */}
this.adjustEditingState(true)}> + onClick={() => this.openEditingOptions()}> + this.state.actionState === SkipNoticeAction.CopyDownvote || + this.state.choosingCategory === true) + ? this.selectedColor : this.unselectedColor} />
@@ -240,7 +257,7 @@ class SkipNoticeComponent extends React.Component this.continueVoting()}> + onClick={() => this.resetStateToStart()}> {chrome.i18n.getMessage("ContinueVoting")} @@ -270,6 +287,7 @@ class SkipNoticeComponent extends React.Component this.prepAction(SkipNoticeAction.CopyDownvote)}> {chrome.i18n.getMessage("CopyAndDownvote")} @@ -277,6 +295,7 @@ class SkipNoticeComponent extends React.Component this.openCategoryChooser()}> {chrome.i18n.getMessage("incorrectCategory")} @@ -285,8 +304,6 @@ class SkipNoticeComponent extends React.Component ), - - /* Category Chooser Row */ (this.state.choosingCategory && @@ -348,8 +366,13 @@ 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)} @@ -399,15 +422,29 @@ class SkipNoticeComponent extends React.Component { if (this.segments.length > 1) { // Use the action selectors as a submit button @@ -538,15 +578,6 @@ class SkipNoticeComponent extends React.Component window.open(wikiLinkText), chrome.i18n.getMessage("OpenCategoryWikiPage")); - this.setState({ - editing: false, - choosingCategory: false, - actionState: SkipNoticeAction.None - }); + const index = this.segments.findIndex(x => x.UUID === segment.UUID); + switch (type) { + case 0: + const wikiLinkText = Config.config.wikiPages.get(segment.category); + this.setNoticeInfoMessageWithOnClick(() => window.open(wikiLinkText), chrome.i18n.getMessage("OpenCategoryWikiPage")); + this.setState({ + voted: utils.replaceArrayElement(this.state.voted, SkipNoticeAction.Downvote, index) + }); + break; + case 1: + this.setState({ + voted: utils.replaceArrayElement(this.state.voted, SkipNoticeAction.Upvote, index) + }); + break; + case 20: + this.setState({ + voted: utils.replaceArrayElement(this.state.voted, SkipNoticeAction.CopyDownvote, index) + }); + break; } + this.addVoteButtonInfo(chrome.i18n.getMessage("voted")); // Change the sponsor locally if (segment) { @@ -639,7 +679,6 @@ class SkipNoticeComponent extends React.Component(array: Type[], value: Type, index: number): Type[] { + array[index] = value; + return array; + } } From 844567dcdf15b5349981053e8e4888dfd6e51071 Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Sat, 9 Oct 2021 08:13:02 +0200 Subject: [PATCH 10/36] Lit fixes --- src/components/SkipNoticeComponent.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 4fadcfb7..7ad24253 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -651,9 +651,9 @@ class SkipNoticeComponent extends React.Component x.UUID === segment.UUID); + const wikiLinkText = Config.config.wikiPages.get(segment.category); switch (type) { case 0: - const wikiLinkText = Config.config.wikiPages.get(segment.category); this.setNoticeInfoMessageWithOnClick(() => window.open(wikiLinkText), chrome.i18n.getMessage("OpenCategoryWikiPage")); this.setState({ voted: utils.replaceArrayElement(this.state.voted, SkipNoticeAction.Downvote, index) @@ -724,7 +724,7 @@ class SkipNoticeComponent extends React.Component Date: Sun, 10 Oct 2021 00:41:21 +0200 Subject: [PATCH 11/36] Changed heigt of 2nd notice. Minor changes. Upvoting lets downvoted segment reappear --- public/content.css | 2 +- src/components/SkipNoticeComponent.tsx | 100 ++++++++----------------- 2 files changed, 32 insertions(+), 70 deletions(-) diff --git a/public/content.css b/public/content.css index 85a6887a..f9a6aab6 100644 --- a/public/content.css +++ b/public/content.css @@ -217,7 +217,7 @@ /* if two are very close to eachother */ .secondSkipNotice { - bottom: 250px; + bottom: 290px; } .noticeLeftIcon { diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 7ad24253..775ab42f 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -235,10 +235,10 @@ class SkipNoticeComponent extends React.Component this.openEditingOptions()}> - + @@ -257,7 +257,10 @@ class SkipNoticeComponent extends React.Component this.resetStateToStart()}> + onClick={() => this.setState({ + thanksForVotingText: null, + messages: [] + })}> {chrome.i18n.getMessage("ContinueVoting")} @@ -279,7 +282,7 @@ class SkipNoticeComponent extends React.Component), /* Edit Segments Row */ - (this.state.editing && + (this.state.editing && !this.state.thanksForVotingText && !(this.state.choosingCategory || this.state.actionState === SkipNoticeAction.CopyDownvote) && @@ -287,7 +290,8 @@ class SkipNoticeComponent extends React.Component this.prepAction(SkipNoticeAction.CopyDownvote)}> {chrome.i18n.getMessage("CopyAndDownvote")} @@ -296,16 +300,15 @@ class SkipNoticeComponent extends React.Component this.openCategoryChooser()}> + onClick={() => this.resetStateToStart(SkipNoticeAction.CategoryVote, true, true)}> {chrome.i18n.getMessage("incorrectCategory")} - ), /* Category Chooser Row */ - (this.state.choosingCategory && + (this.state.choosingCategory && !this.state.thanksForVotingText && @@ -326,13 +329,12 @@ class SkipNoticeComponent extends React.Component } - ), /* Segment Chooser Row */ - (this.state.actionState !== SkipNoticeAction.None && + (this.state.actionState !== SkipNoticeAction.None && this.segments.length > 1 && !this.state.thanksForVotingText && @@ -364,11 +366,13 @@ class SkipNoticeComponent extends React.Component { - if (this.segments.length > 1) { - // Use the action selectors as a submit button - this.prepAction(SkipNoticeAction.CategoryVote); - } - }); + this.resetStateToStart(undefined, true); } getCategoryOptions(): React.ReactElement[] { @@ -650,7 +610,7 @@ class SkipNoticeComponent extends React.Component x.UUID === segment.UUID); + const index = utils.getSponsorIndexFromUUID(this.segments, segment.UUID); const wikiLinkText = Config.config.wikiPages.get(segment.category); switch (type) { case 0: @@ -671,13 +631,15 @@ class SkipNoticeComponent extends React.Component Date: Sun, 10 Oct 2021 10:47:47 +0200 Subject: [PATCH 12/36] Vip warning added when downvoting. sry that it is in the same branch, but this is the most current UI --- src/components/SkipNoticeComponent.tsx | 57 ++++++++++++++++------- src/config.ts | 9 +++- src/content.ts | 63 +++++++++++++++++++++++++- src/types.ts | 4 +- 4 files changed, 112 insertions(+), 21 deletions(-) diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 775ab42f..eaca2b42 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -83,6 +83,7 @@ class SkipNoticeComponent extends React.Component void; @@ -117,6 +118,7 @@ class SkipNoticeComponent extends React.Component this.prepAction(SkipNoticeAction.Downvote)}> - + {/* Copy and Downvote Button */} @@ -290,8 +292,7 @@ class SkipNoticeComponent extends React.Component this.prepAction(SkipNoticeAction.CopyDownvote)}> {chrome.i18n.getMessage("CopyAndDownvote")} @@ -315,7 +316,7 @@ class SkipNoticeComponent extends React.Component {this.getCategoryOptions()} @@ -366,27 +367,38 @@ 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)} ); } - return elements; } + submissionChooserOpacitySelector(index: number): number { + const isUpvote = this.state.actionState === SkipNoticeAction.Upvote; + const isDownvote = this.state.actionState == SkipNoticeAction.Downvote; + const isCopyDownvote = this.state.actionState == SkipNoticeAction.CopyDownvote; + const shouldBeGray: boolean= isUpvote && this.state.voted[index] == SkipNoticeAction.Upvote || + isDownvote && this.state.voted[index] == SkipNoticeAction.Downvote || + isCopyDownvote && this.state.copied[index] == SkipNoticeAction.CopyDownvote; + return shouldBeGray ? 0.35 : 1; + } + + submissionChooserColorSelector(index: number): string { + const isDownvote = this.state.actionState == SkipNoticeAction.Downvote; + const isCopyDownvote = this.state.actionState == SkipNoticeAction.CopyDownvote; + const shouldWarnUser: boolean = (isDownvote || isCopyDownvote) + && this.segments[index].locked === true; + return (shouldWarnUser) ? this.lockedColor : this.unselectedColor; + } + onMouseEnter(): void { if (this.state.smaller) { this.setState({ @@ -541,19 +553,22 @@ class SkipNoticeComponent extends React.Component getCategoryActionType(cat as Category) === CategoryActionType.Skippable)); + const categories = (CompileConfig.categoryList.filter((cat => getCategoryActionType(cat as Category) === CategoryActionType.Skippable))) as Category[]; for (const category of categories) { elements.push( ); } - return elements; } + categoryVoteButtonLockIcon(category: Category): string { + return (this.contentContainer().lockedCategories.includes(category)) ? "🔒" : " "; + } + unskip(index: number): void { this.contentContainer().unskipSponsorTime(this.segments[index], this.props.unskipTime); @@ -699,6 +714,16 @@ class SkipNoticeComponent extends React.Component 1) { + return (this.state.actionState === downvoteType) ? this.selectedColor : this.unselectedColor; + } else { + // You dont have segment selectors so the lockbutton needs to be colored and cannot be selected. + return (this.segments[0].locked === true) ? this.lockedColor : this.unselectedColor; + } + } + private getUnskipText(): string { switch (this.props.segments[0].actionType) { case ActionType.Mute: { diff --git a/src/config.ts b/src/config.ts index 43345107..f077d8eb 100644 --- a/src/config.ts +++ b/src/config.ts @@ -3,7 +3,9 @@ import { Category, CategorySelection, CategorySkipOption, NoticeVisbilityMode, P interface SBConfig { userID: string, - /** Contains unsubmitted segments that the user has created. */ + isVip: boolean, + lastIsVipUpdate: number, + /* Contains unsubmitted segments that the user has created. */ segmentTimes: SBMap, defaultCategory: Category, whitelistedChannels: string[], @@ -153,6 +155,8 @@ const Config: SBObject = { configListeners: [], defaults: { userID: null, + isVip: false, + lastIsVipUpdate: 0, segmentTimes: new SBMap("segmentTimes"), defaultCategory: "chooseACategory" as Category, whitelistedChannels: [], @@ -214,7 +218,8 @@ const Config: SBObject = { colorPalette: new SBMap("colorPalette", [ ["SponsorBlockRed", "#780303"], - ["SponsorBlockWhite", "#ffffff"] + ["SponsorBlockWhite", "#ffffff"], + ["SponsorBlockLocked", "#ffc83d"] ]), // Preview bar diff --git a/src/content.ts b/src/content.ts index b2ea4342..3fc942d8 100644 --- a/src/content.ts +++ b/src/content.ts @@ -34,8 +34,10 @@ let lastPOISkip = 0; // JSON video info let videoInfo: VideoInfo = null; -//the channel this video is about +// The channel this video is about let channelIDInfo: ChannelIDInfo; +// Locked Categories in this tab, like: ["sponsor","intro","outro"] +let lockedCategories: Category[] = []; // Skips are scheduled to ensure precision. // Skips are rescheduled every seeking event. @@ -121,7 +123,8 @@ const skipNoticeContentContainer: ContentContainer = () => ({ updateEditButtonsOnPlayer, previewTime, videoInfo, - getRealCurrentTime: getRealCurrentTime + getRealCurrentTime: getRealCurrentTime, + lockedCategories }); // value determining when to count segment as skipped and send telemetry to server (percent based) @@ -752,6 +755,62 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) { sponsorLookupRetries++; } + // Look up locked status if the user is a vip + isVipLookup(); + const isVip = Config.config.isVip; + if (isVip) { + lockedCategoriesLookup(id); + lockedSegmentsLookup() + } +} + +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 + Config.config.lastIsVipUpdate = currentTime; + utils.sendRequestToServer("GET", "/api/isUserVIP?userID=" + Config.config.userID, + (response) => { + if (response.status === 200 && response.ok) { + console.log(JSON.parse(response.responseText).vip); + console.log(Config.config.userID); + if (JSON.parse(response.responseText).vip === true) { + Config.config.isVip = true; + } + else Config.config.isVip = false; + } + } + ) + } +} + +async function lockedSegmentsLookup() { + let url = "" + for (let i = 0; i < sponsorTimes.length; i++) { + if (i !== 0) url += ","; + url += `"` + sponsorTimes[i].UUID + `"`; + } + utils.sendRequestToServer("GET", "/api/segmentInfo?UUIDs=[" + url + "]", + (response) => { + if (response.status === 200 && response.ok) { + for (let i = 0; i < sponsorTimes.length && i < 10; i++) { //because the api only return 10 segments maximum + sponsorTimes[i].locked = (JSON.parse(response.responseText)[i].locked === 1) ? true : false; + } + } + } + ) +} + +async function lockedCategoriesLookup(id: string) { + utils.sendRequestToServer("GET", "/api/lockCategories?videoID=" + id, + (response) => { + if (response.status === 200 && response.ok) { + for (const category of JSON.parse(response.responseText).categories) { + lockedCategories.push(category); + } + } + } + ) } function retryFetch(): void { diff --git a/src/types.ts b/src/types.ts index c60e52bb..4ffdf33f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -20,7 +20,8 @@ export interface ContentContainer { updateEditButtonsOnPlayer: () => void, previewTime: (time: number, unpause?: boolean) => void, videoInfo: VideoInfo, - getRealCurrentTime: () => number + getRealCurrentTime: () => number, + lockedCategories: string[] } } @@ -74,6 +75,7 @@ export enum SponsorSourceType { export interface SponsorTime { segment: [number] | [number, number]; UUID: SegmentUUID; + locked?: boolean; category: Category; actionType: ActionType; From d72d5dcbcbbdf1e7325a584febd23e17ae88499c Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Sun, 10 Oct 2021 10:50:35 +0200 Subject: [PATCH 13/36] Lint fixes --- src/content.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index 3fc942d8..3ba015ee 100644 --- a/src/content.ts +++ b/src/content.ts @@ -37,7 +37,7 @@ let videoInfo: VideoInfo = null; // The channel this video is about let channelIDInfo: ChannelIDInfo; // Locked Categories in this tab, like: ["sponsor","intro","outro"] -let lockedCategories: Category[] = []; +const lockedCategories: Category[] = []; // Skips are scheduled to ensure precision. // Skips are rescheduled every seeking event. From b927ebbbf7f9feb38f158681e3bdad37614adaef Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Sun, 10 Oct 2021 10:56:27 +0200 Subject: [PATCH 14/36] Lint fixes --- src/svg-icons/pencil_svg.tsx | 24 +++++++++++----------- src/svg-icons/thumbs_down_svg.tsx | 34 +++++++++++++++---------------- src/svg-icons/thumbs_up_svg.tsx | 32 ++++++++++++++--------------- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/svg-icons/pencil_svg.tsx b/src/svg-icons/pencil_svg.tsx index 866f908e..3ddb81c2 100644 --- a/src/svg-icons/pencil_svg.tsx +++ b/src/svg-icons/pencil_svg.tsx @@ -2,17 +2,17 @@ import * as React from "react"; const pencilSvg = ({ fill = "#ffffff" -}) => ( - - - -); + }): JSX.Element => ( + + + + ); export default pencilSvg; diff --git a/src/svg-icons/thumbs_down_svg.tsx b/src/svg-icons/thumbs_down_svg.tsx index 4bb89d79..ce61db5a 100644 --- a/src/svg-icons/thumbs_down_svg.tsx +++ b/src/svg-icons/thumbs_down_svg.tsx @@ -2,22 +2,22 @@ import * as React from "react"; const thumbsDownSvg = ({ fill = "#ffffff" -}) => ( - - - - - -); + }): JSX.Element => ( + + + + + + ); export default thumbsDownSvg; diff --git a/src/svg-icons/thumbs_up_svg.tsx b/src/svg-icons/thumbs_up_svg.tsx index 8dd77c1c..10c95d94 100644 --- a/src/svg-icons/thumbs_up_svg.tsx +++ b/src/svg-icons/thumbs_up_svg.tsx @@ -2,21 +2,21 @@ import * as React from "react"; const thumbsUpSvg = ({ fill = "#ffffff" -}) => ( - - - - -); + }): JSX.Element => ( + + + + + ); export default thumbsUpSvg; From aa8ee02277080699cf0587ee2f2064c3cafba057 Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Mon, 11 Oct 2021 03:49:14 +0200 Subject: [PATCH 15/36] Added colored text if a category is locked for submitting and changing category --- public/content.css | 4 ++++ src/components/SkipNoticeComponent.tsx | 9 +++++---- src/components/SponsorTimeEditComponent.tsx | 11 +++++++++-- src/content.ts | 7 ++++++- 4 files changed, 24 insertions(+), 7 deletions(-) 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) => { From 60ef51b7f5a2ff58751d7cfea004d53983c9a7bd Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Mon, 11 Oct 2021 03:50:19 +0200 Subject: [PATCH 16/36] I forgot to change the 24h countdown back to 24h instead of 1 seconds --- src/content.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index 2f37cf01..4db051e7 100644 --- a/src/content.ts +++ b/src/content.ts @@ -772,7 +772,7 @@ function getVipSegmentsWarnings(id: string): void { async function isVipLookup() { const currentTime = Date.now(); const lastUpdate = Config.config.lastIsVipUpdate; - if (currentTime - lastUpdate > 1) { //max every 24 hours 1000*60*60*24 + if (currentTime - lastUpdate > 1000*60*60*24) { //max every 24 hours 1000*60*60*24 Config.config.lastIsVipUpdate = currentTime; utils.sendRequestToServer("GET", "/api/isUserVIP?userID=" + Config.config.userID, (response) => { From 77ce9433a75efd449fc7624bb0288f5dfedeeee0 Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Wed, 13 Oct 2021 06:08:14 +0200 Subject: [PATCH 17/36] removed response.ok for response === 200 --- src/content.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index f708e4f4..c6318b29 100644 --- a/src/content.ts +++ b/src/content.ts @@ -797,7 +797,7 @@ async function lockedSegmentsLookup() { } utils.sendRequestToServer("GET", "/api/segmentInfo?UUIDs=[" + url + "]", (response) => { - if (response.status === 200 && response.ok) { + if (response.status === 200) { for (let i = 0; i < sponsorTimes.length && i < 10; i++) { //because the api only return 10 segments maximum sponsorTimes[i].locked = (JSON.parse(response.responseText)[i].locked === 1) ? true : false; } From 75607dea1c60a549ab082776f5e94697502d9b9d Mon Sep 17 00:00:00 2001 From: Maxim Date: Wed, 13 Oct 2021 22:48:07 +0500 Subject: [PATCH 18/36] Added margin-bottom for #sponsorblockPopup This margin is to separate popup window from playlist/related videos list --- public/popup.css | 1 + 1 file changed, 1 insertion(+) diff --git a/public/popup.css b/public/popup.css index db0e4726..eab8dcd3 100644 --- a/public/popup.css +++ b/public/popup.css @@ -46,6 +46,7 @@ width: 330px; padding: 22px; text-align: center; + margin-bottom: var(--ytd-margin-6x); } #issueReporterTimeButtons > .votingButtons > .segmentTimeButton { From af66a77026e7165ebfbd5a310bacc5ca5971a88e Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Thu, 14 Oct 2021 02:11:15 +0200 Subject: [PATCH 19/36] Fixed logic mistake if undovotes are ever implemented --- src/components/SkipNoticeComponent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 0f24b7df..fa61e339 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -642,7 +642,7 @@ class SkipNoticeComponent extends React.Component Date: Thu, 14 Oct 2021 02:16:04 +0200 Subject: [PATCH 20/36] Removed console.log and redundancy --- src/content.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/content.ts b/src/content.ts index c6318b29..4d4c965e 100644 --- a/src/content.ts +++ b/src/content.ts @@ -776,9 +776,7 @@ async function isVipLookup() { Config.config.lastIsVipUpdate = currentTime; utils.sendRequestToServer("GET", "/api/isUserVIP?userID=" + Config.config.userID, (response) => { - if (response.status === 200 && response.ok) { - console.log(JSON.parse(response.responseText).vip); - console.log(Config.config.userID); + if (response.status === 200) { if (JSON.parse(response.responseText).vip === true) { Config.config.isVip = true; } From ff5fa4c724fe292d9d05c6caf712ce910dec4db9 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 13 Oct 2021 23:14:51 -0400 Subject: [PATCH 21/36] Move config values and close notice --- config.json.example | 12 +++++++++++ src/components/SkipNoticeComponent.tsx | 15 +++++++++---- src/config.ts | 30 +++++++++----------------- src/content.ts | 3 ++- 4 files changed, 35 insertions(+), 25 deletions(-) diff --git a/config.json.example b/config.json.example index ffc482a5..f6916065 100644 --- a/config.json.example +++ b/config.json.example @@ -12,5 +12,17 @@ "preview": ["skip"], "music_offtopic": ["skip"], "poi_highlight": ["skip"] + }, + "wikiLinks": { + "sponsor": "https://wiki.sponsor.ajay.app/w/Sponsor", + "selfpromo": "https://wiki.sponsor.ajay.app/w/Unpaid/Self_Promotion", + "interaction": "https://wiki.sponsor.ajay.app/w/Interaction_Reminder_(Subscribe)", + "intro": "https://wiki.sponsor.ajay.app/w/Intermission/Intro_Animation", + "outro": "https://wiki.sponsor.ajay.app/w/Endcards/Credits", + "preview": "https://wiki.sponsor.ajay.app/w/Preview/Recap", + "music_offtopic": "https://wiki.sponsor.ajay.app/w/Music:_Non-Music_Section", + "poi_highlight": "https://wiki.sponsor.ajay.app/w/Highlight", + "guidelines": "https://wiki.sponsor.ajay.app/w/Guidelines", + "mute": "https://wiki.sponsor.ajay.app/w/Mute_Segment" } } diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index fa61e339..4664ff76 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -116,9 +116,9 @@ class SkipNoticeComponent extends React.Component window.open(wikiLinkText), chrome.i18n.getMessage("OpenCategoryWikiPage")); this.setState({ voted: utils.replaceArrayElement(this.state.voted, SkipNoticeAction.Downvote, index) }); + break; case 1: this.setState({ voted: utils.replaceArrayElement(this.state.voted, SkipNoticeAction.Upvote, index) }); + break; case 20: this.setState({ voted: utils.replaceArrayElement(this.state.voted, SkipNoticeAction.None, index) }); + break; } + this.addVoteButtonInfo(chrome.i18n.getMessage("voted")); + // Change the sponsor locally if (segment) { if (type === 0) { @@ -657,6 +663,7 @@ class SkipNoticeComponent extends React.Component, - colorPalette: SBMap + colorPalette: { + red: string, + white: string, + locked: string + } // What categories should be skipped categorySelections: CategorySelection[], @@ -203,24 +206,11 @@ const Config: SBObject = { option: CategorySkipOption.AutoSkip }], - wikiPages: new SBMap("wikiLinks", [ - ["sponsor", "https://wiki.sponsor.ajay.app/w/Sponsor"], - ["selfpromo", "https://wiki.sponsor.ajay.app/w/Unpaid/Self_Promotion"], - ["interaction", "https://wiki.sponsor.ajay.app/w/Interaction_Reminder_(Subscribe)"], - ["intro", "https://wiki.sponsor.ajay.app/w/Intermission/Intro_Animation"], - ["outro", "https://wiki.sponsor.ajay.app/w/Endcards/Credits"], - ["preview", "https://wiki.sponsor.ajay.app/w/Preview/Recap"], - ["music_offtopic", "https://wiki.sponsor.ajay.app/w/Music:_Non-Music_Section"], - ["highlight_poi", "https://wiki.sponsor.ajay.app/w/Highlight"], - ["guidelines", "https://wiki.sponsor.ajay.app/w/Guidelines"], - ["mute", "https://wiki.sponsor.ajay.app/w/Mute_Segment"], - ]), - - colorPalette: new SBMap("colorPalette", [ - ["SponsorBlockRed", "#780303"], - ["SponsorBlockWhite", "#ffffff"], - ["SponsorBlockLocked", "#ffc83d"] - ]), + colorPalette: { + red: "#780303", + white: "#ffffff", + locked: "#ffc83d" + }, // Preview bar barTypes: { diff --git a/src/content.ts b/src/content.ts index 4d4c965e..c6694c3f 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1746,7 +1746,8 @@ function resetSponsorSubmissionNotice() { function submitSponsorTimes() { if (submissionNotice !== null){ - submissionNotice.noticeElement.style.display = (submissionNotice.noticeElement.style.display === "none") ? null : "none"; + submissionNotice.close(); + submissionNotice = null; return; } From 3e3e9796b1ef2dc1a848f82f370da6534c30ac80 Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Thu, 14 Oct 2021 05:19:18 +0200 Subject: [PATCH 22/36] syntax error Co-authored-by: Ajay Ramachandran --- src/components/SponsorTimeEditComponent.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index 83e526dc..16707c26 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -263,8 +263,8 @@ class SponsorTimeEditComponent extends React.Component): void { From 9b9174ab9a168bd104ec1f24b2cb874f809b0bd4 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 13 Oct 2021 23:25:46 -0400 Subject: [PATCH 23/36] Simplify vip info fetching --- src/content.ts | 63 +++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/src/content.ts b/src/content.ts index c6694c3f..b1204bbe 100644 --- a/src/content.ts +++ b/src/content.ts @@ -756,12 +756,12 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) { sponsorLookupRetries++; } - getVipSegmentsWarnings(id); + lookupVipInformation(id); } -function getVipSegmentsWarnings(id: string): void { - // Look up locked status if the user is a vip - isVipLookup(); +function lookupVipInformation(id: string): void { + updateVipInfo(); + const isVip = Config.config.isVip; if (isVip) { lockedCategoriesLookup(id); @@ -769,51 +769,50 @@ function getVipSegmentsWarnings(id: string): void { } } -async function isVipLookup() { +async function updateVipInfo() { 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 > 1000 * 60 * 60 * 72) { // 72 hours Config.config.lastIsVipUpdate = currentTime; - utils.sendRequestToServer("GET", "/api/isUserVIP?userID=" + Config.config.userID, - (response) => { + + utils.sendRequestToServer("GET", "/api/isUserVIP?userID=" + Config.config.userID, (response) => { if (response.status === 200) { - if (JSON.parse(response.responseText).vip === true) { - Config.config.isVip = true; - } - else Config.config.isVip = false; + let isVip = false; + try { + const vipResponse = JSON.parse(response.responseText)?.vip; + if (typeof(vipResponse) === "boolean") { + isVip = vipResponse; + } + } catch (e) { } //eslint-disable-line no-empty + + Config.config.isVip = isVip; } - } - ) + }); } } async function lockedSegmentsLookup() { - let url = "" - for (let i = 0; i < sponsorTimes.length; i++) { - if (i !== 0) url += ","; - url += `"` + sponsorTimes[i].UUID + `"`; - } - utils.sendRequestToServer("GET", "/api/segmentInfo?UUIDs=[" + url + "]", - (response) => { - if (response.status === 200) { - for (let i = 0; i < sponsorTimes.length && i < 10; i++) { //because the api only return 10 segments maximum + utils.asyncRequestToServer("GET", "/api/segmentInfo", { UUIDs: sponsorTimes?.map((segment) => segment.UUID) }) + .then((response) => { + if (response.status === 200) { + for (let i = 0; i < sponsorTimes.length && i < 10; i++) { // Because the api only return 10 segments maximum + try { sponsorTimes[i].locked = (JSON.parse(response.responseText)[i].locked === 1) ? true : false; - } + } catch (e) { } //eslint-disable-line no-empty } } - ) + }); } async function lockedCategoriesLookup(id: string) { - utils.sendRequestToServer("GET", "/api/lockCategories?videoID=" + id, - (response) => { - if (response.status === 200 && response.ok) { - for (const category of JSON.parse(response.responseText).categories) { - lockedCategories.push(category); - } + utils.asyncRequestToServer("GET", "/api/lockCategories?videoID=" + id) + .then((response) => { + if (response.status === 200 && response.ok) { + for (const category of JSON.parse(response.responseText).categories) { + lockedCategories.push(category); } } - ) + }); } function retryFetch(): void { From 45274f5c7204d1824db751778d1a77259875970c Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 13 Oct 2021 23:32:52 -0400 Subject: [PATCH 24/36] Wait for vip info to be fetched --- src/content.ts | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/content.ts b/src/content.ts index b1204bbe..79b166dc 100644 --- a/src/content.ts +++ b/src/content.ts @@ -760,13 +760,12 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) { } function lookupVipInformation(id: string): void { - updateVipInfo(); - - const isVip = Config.config.isVip; - if (isVip) { - lockedCategoriesLookup(id); - lockedSegmentsLookup() - } + updateVipInfo().then((isVip) => { + if (isVip) { + lockedCategoriesLookup(id); + lockedSegmentsLookup() + } + }) } async function updateVipInfo() { @@ -775,20 +774,23 @@ async function updateVipInfo() { if (currentTime - lastUpdate > 1000 * 60 * 60 * 72) { // 72 hours Config.config.lastIsVipUpdate = currentTime; - utils.sendRequestToServer("GET", "/api/isUserVIP?userID=" + Config.config.userID, (response) => { - if (response.status === 200) { - let isVip = false; - try { - const vipResponse = JSON.parse(response.responseText)?.vip; - if (typeof(vipResponse) === "boolean") { - isVip = vipResponse; - } - } catch (e) { } //eslint-disable-line no-empty + const response = await utils.asyncRequestToServer("GET", "/api/isUserVIP", { userID: Config.config.userID}); - Config.config.isVip = isVip; - } - }); + if (response.ok) { + let isVip = false; + try { + const vipResponse = JSON.parse(response.responseText)?.vip; + if (typeof(vipResponse) === "boolean") { + isVip = vipResponse; + } + } catch (e) { } //eslint-disable-line no-empty + + Config.config.isVip = isVip; + return isVip; + } } + + return Config.config.isVip; } async function lockedSegmentsLookup() { @@ -805,7 +807,7 @@ async function lockedSegmentsLookup() { } async function lockedCategoriesLookup(id: string) { - utils.asyncRequestToServer("GET", "/api/lockCategories?videoID=" + id) + utils.asyncRequestToServer("GET", "/api/lockCategories", { videoID: id }) .then((response) => { if (response.status === 200 && response.ok) { for (const category of JSON.parse(response.responseText).categories) { From 27f5997e5a297ccb7db06d439dd6dde1f5e6a905 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 13 Oct 2021 23:34:25 -0400 Subject: [PATCH 25/36] Add return types to vip fetching functions --- src/content.ts | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/content.ts b/src/content.ts index 79b166dc..e147bd6d 100644 --- a/src/content.ts +++ b/src/content.ts @@ -768,7 +768,7 @@ function lookupVipInformation(id: string): void { }) } -async function updateVipInfo() { +async function updateVipInfo(): Promise { const currentTime = Date.now(); const lastUpdate = Config.config.lastIsVipUpdate; if (currentTime - lastUpdate > 1000 * 60 * 60 * 72) { // 72 hours @@ -793,28 +793,26 @@ async function updateVipInfo() { return Config.config.isVip; } -async function lockedSegmentsLookup() { - utils.asyncRequestToServer("GET", "/api/segmentInfo", { UUIDs: sponsorTimes?.map((segment) => segment.UUID) }) - .then((response) => { - if (response.status === 200) { - for (let i = 0; i < sponsorTimes.length && i < 10; i++) { // Because the api only return 10 segments maximum - try { - sponsorTimes[i].locked = (JSON.parse(response.responseText)[i].locked === 1) ? true : false; - } catch (e) { } //eslint-disable-line no-empty - } +async function lockedSegmentsLookup(): Promise { + const response = await utils.asyncRequestToServer("GET", "/api/segmentInfo", { UUIDs: sponsorTimes?.map((segment) => segment.UUID) }); + + if (response.status === 200) { + for (let i = 0; i < sponsorTimes.length && i < 10; i++) { // Because the api only return 10 segments maximum + try { + sponsorTimes[i].locked = (JSON.parse(response.responseText)[i].locked === 1) ? true : false; + } catch (e) { } //eslint-disable-line no-empty } - }); + } } -async function lockedCategoriesLookup(id: string) { - utils.asyncRequestToServer("GET", "/api/lockCategories", { videoID: id }) - .then((response) => { - if (response.status === 200 && response.ok) { - for (const category of JSON.parse(response.responseText).categories) { - lockedCategories.push(category); - } +async function lockedCategoriesLookup(id: string): Promise { + const response = await utils.asyncRequestToServer("GET", "/api/lockCategories", { videoID: id }); + + if (response.status === 200 && response.ok) { + for (const category of JSON.parse(response.responseText).categories) { + lockedCategories.push(category); } - }); + } } function retryFetch(): void { From fc7fc693ed5bc36866d54084f9db669f83aac937 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 13 Oct 2021 23:57:59 -0400 Subject: [PATCH 26/36] Fix getting locked category --- src/components/SponsorTimeEditComponent.tsx | 2 +- src/content.ts | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index 16707c26..2fcae408 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -254,7 +254,7 @@ class SponsorTimeEditComponent extends React.Component + className={this.getCategoryLockedClass(category)}> {chrome.i18n.getMessage("category_" + category)} ); diff --git a/src/content.ts b/src/content.ts index e147bd6d..260e9760 100644 --- a/src/content.ts +++ b/src/content.ts @@ -37,7 +37,7 @@ let videoInfo: VideoInfo = null; // The channel this video is about let channelIDInfo: ChannelIDInfo; // Locked Categories in this tab, like: ["sponsor","intro","outro"] -const lockedCategories: Category[] = []; +let lockedCategories: Category[] = []; // Skips are scheduled to ensure precision. // Skips are rescheduled every seeking event. @@ -234,6 +234,7 @@ function resetValues() { status: ChannelIDStatus.Fetching, id: null }; + lockedCategories = []; //empty the preview bar if (previewBar !== null) { @@ -808,10 +809,13 @@ async function lockedSegmentsLookup(): Promise { async function lockedCategoriesLookup(id: string): Promise { const response = await utils.asyncRequestToServer("GET", "/api/lockCategories", { videoID: id }); - if (response.status === 200 && response.ok) { - for (const category of JSON.parse(response.responseText).categories) { - lockedCategories.push(category); - } + if (response.ok) { + try { + const categoriesResponse = JSON.parse(response.responseText).categories; + if (Array.isArray(categoriesResponse)) { + lockedCategories = categoriesResponse; + } + } catch (e) { } //eslint-disable-line no-empty } } From 7698be8462c792881950358eed0697d8bb5c92f0 Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Thu, 14 Oct 2021 07:21:07 +0200 Subject: [PATCH 27/36] Remove merge mistake --- src/config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index a685e8d8..51c1f06e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -46,7 +46,6 @@ interface SBConfig { autoHideInfoButton: boolean, autoSkipOnMusicVideos: boolean, highlightCategoryUpdate: boolean, - copySegment, colorPalette: { red: string, white: string, From a457a8009ec4f9f55199a3b6603cd8bd411a9ba3 Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Thu, 14 Oct 2021 08:05:55 +0200 Subject: [PATCH 28/36] SkipNotice countdown now updates again on config update --- src/components/SkipNoticeComponent.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 4664ff76..b20776b7 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -631,6 +631,7 @@ class SkipNoticeComponent extends React.Component window.open(wikiLinkText), chrome.i18n.getMessage("OpenCategoryWikiPage")); this.setState({ voted: utils.replaceArrayElement(this.state.voted, SkipNoticeAction.Downvote, index) @@ -694,11 +695,18 @@ class SkipNoticeComponent extends React.Component Date: Thu, 14 Oct 2021 19:05:36 +0200 Subject: [PATCH 29/36] fix loading text not displaying upon voting --- src/components/SkipNoticeComponent.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index b20776b7..1a0b0f16 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -502,20 +502,17 @@ class SkipNoticeComponent extends React.Component Date: Fri, 15 Oct 2021 00:31:07 -0400 Subject: [PATCH 30/36] Remove extra segment lookup and use lockbyhash lookup --- src/components/SkipNoticeComponent.tsx | 8 ++++---- src/content.ts | 18 +++--------------- src/types.ts | 2 +- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 4664ff76..6aad43dd 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -394,9 +394,9 @@ class SkipNoticeComponent extends React.Component { if (isVip) { lockedCategoriesLookup(id); - lockedSegmentsLookup() } }) } @@ -794,24 +793,13 @@ async function updateVipInfo(): Promise { return Config.config.isVip; } -async function lockedSegmentsLookup(): Promise { - const response = await utils.asyncRequestToServer("GET", "/api/segmentInfo", { UUIDs: sponsorTimes?.map((segment) => segment.UUID) }); - - if (response.status === 200) { - for (let i = 0; i < sponsorTimes.length && i < 10; i++) { // Because the api only return 10 segments maximum - try { - sponsorTimes[i].locked = (JSON.parse(response.responseText)[i].locked === 1) ? true : false; - } catch (e) { } //eslint-disable-line no-empty - } - } -} - async function lockedCategoriesLookup(id: string): Promise { - const response = await utils.asyncRequestToServer("GET", "/api/lockCategories", { videoID: id }); + const hashPrefix = (await utils.getHash(id, 1)).substr(0, 4); + const response = await utils.asyncRequestToServer("GET", "/api/lockCategories/" + hashPrefix); if (response.ok) { try { - const categoriesResponse = JSON.parse(response.responseText).categories; + const categoriesResponse = JSON.parse(response.responseText).filter((lockInfo) => lockInfo.videoID === id)[0]?.categories; if (Array.isArray(categoriesResponse)) { lockedCategories = categoriesResponse; } diff --git a/src/types.ts b/src/types.ts index 4ffdf33f..1caf257c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -75,7 +75,7 @@ export enum SponsorSourceType { export interface SponsorTime { segment: [number] | [number, number]; UUID: SegmentUUID; - locked?: boolean; + locked?: number; category: Category; actionType: ActionType; From fe5499e80a887fd12901183c5b86219fd7a11478 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Fri, 15 Oct 2021 00:56:48 -0400 Subject: [PATCH 31/36] Code style fixes and react errors --- public/content.css | 2 +- src/components/SkipNoticeComponent.tsx | 93 +++++++++++---------- src/components/SponsorTimeEditComponent.tsx | 2 +- src/content.ts | 2 +- src/utils.ts | 5 -- 5 files changed, 52 insertions(+), 52 deletions(-) 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; - } } From d375a97e996431963b569fa7d5f5cf6a0dd29abc Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Fri, 15 Oct 2021 20:52:15 +0200 Subject: [PATCH 32/36] Vip Warning also in popup --- manifest/manifest.json | 1 + public/icons/thumbs_down_locked.svg | 58 +++++++++++++++++++++++++++++ src/popup.ts | 3 +- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 public/icons/thumbs_down_locked.svg diff --git a/manifest/manifest.json b/manifest/manifest.json index c9350235..5f640277 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -37,6 +37,7 @@ "icons/upvote.png", "icons/downvote.png", "icons/thumbs_down.svg", + "icons/thumbs_down_locked.svg", "icons/thumbs_up.svg", "icons/help.svg", "icons/report.png", diff --git a/public/icons/thumbs_down_locked.svg b/public/icons/thumbs_down_locked.svg new file mode 100644 index 00000000..57672e2d --- /dev/null +++ b/public/icons/thumbs_down_locked.svg @@ -0,0 +1,58 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/src/popup.ts b/src/popup.ts index 680e0779..2cdbab04 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -381,6 +381,7 @@ async function runThePopup(messageListener?: MessageListener): Promise { for (let i = 0; i < segmentTimes.length; i++) { const UUID = segmentTimes[i].UUID; + const locked = segmentTimes[i].locked; const sponsorTimeButton = document.createElement("button"); sponsorTimeButton.className = "segmentTimeButton popupElement"; @@ -430,7 +431,7 @@ async function runThePopup(messageListener?: MessageListener): Promise { const downvoteButton = document.createElement("img"); downvoteButton.id = "sponsorTimesDownvoteButtonsContainer" + UUID; downvoteButton.className = "voteButton"; - downvoteButton.src = chrome.runtime.getURL("icons/thumbs_down.svg"); + downvoteButton.src = locked ? chrome.runtime.getURL("icons/thumbs_down_locked.svg") : chrome.runtime.getURL("icons/thumbs_down.svg"); downvoteButton.addEventListener("click", () => vote(0, UUID)); //uuid button From 8aea74160c1a596a608207b66ffbcb39cf2ae38a Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Fri, 15 Oct 2021 21:01:32 +0200 Subject: [PATCH 33/36] only change color if user isVip --- src/popup.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/popup.ts b/src/popup.ts index 2cdbab04..5a75c8ba 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -379,6 +379,7 @@ async function runThePopup(messageListener?: MessageListener): Promise { container.removeChild(container.firstChild); } + const isVip = Config.config.isVip; for (let i = 0; i < segmentTimes.length; i++) { const UUID = segmentTimes[i].UUID; const locked = segmentTimes[i].locked; @@ -431,7 +432,7 @@ async function runThePopup(messageListener?: MessageListener): Promise { const downvoteButton = document.createElement("img"); downvoteButton.id = "sponsorTimesDownvoteButtonsContainer" + UUID; downvoteButton.className = "voteButton"; - downvoteButton.src = locked ? chrome.runtime.getURL("icons/thumbs_down_locked.svg") : chrome.runtime.getURL("icons/thumbs_down.svg"); + downvoteButton.src = locked && isVip ? chrome.runtime.getURL("icons/thumbs_down_locked.svg") : chrome.runtime.getURL("icons/thumbs_down.svg"); downvoteButton.addEventListener("click", () => vote(0, UUID)); //uuid button From 08630616655d91a40b864d9997f0f5975d0e9b6a Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Fri, 15 Oct 2021 18:57:36 -0400 Subject: [PATCH 34/36] Fix indentation in manifest --- manifest/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest/manifest.json b/manifest/manifest.json index 5f640277..3c49bebf 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -37,7 +37,7 @@ "icons/upvote.png", "icons/downvote.png", "icons/thumbs_down.svg", - "icons/thumbs_down_locked.svg", + "icons/thumbs_down_locked.svg", "icons/thumbs_up.svg", "icons/help.svg", "icons/report.png", From 63d4c1aedb72baefe4b5557b34308f937dab1821 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Fri, 15 Oct 2021 19:01:03 -0400 Subject: [PATCH 35/36] New Crowdin updates (#990) --- public/_locales/bg/messages.json | 3 + public/_locales/cs/messages.json | 3 + public/_locales/de/messages.json | 5 +- public/_locales/es/messages.json | 3 + public/_locales/et/messages.json | 3 + public/_locales/fi/messages.json | 3 + public/_locales/fr/messages.json | 13 +++- public/_locales/id/messages.json | 118 +++++++++++++++++++++++++++++-- public/_locales/ko/messages.json | 3 + public/_locales/nl/messages.json | 3 + public/_locales/ru/messages.json | 5 +- public/_locales/sk/messages.json | 18 +++++ public/_locales/sv/messages.json | 6 ++ public/_locales/ta/messages.json | 101 ++++++++++++++++++++++++++ public/_locales/uk/messages.json | 3 + public/_locales/vi/messages.json | 58 ++++++++++++++- 16 files changed, 339 insertions(+), 9 deletions(-) diff --git a/public/_locales/bg/messages.json b/public/_locales/bg/messages.json index 3319ba56..12f01b69 100644 --- a/public/_locales/bg/messages.json +++ b/public/_locales/bg/messages.json @@ -810,5 +810,8 @@ }, "LearnMore": { "message": "Научете повече" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Използвайте колелото на мишката, докато държите курсора върху полето за редактиране, за да коригирате бързо времето. Комбинации с клавиша ctrl или shift могат да се използват за фина настройка на промените." } } diff --git a/public/_locales/cs/messages.json b/public/_locales/cs/messages.json index fe10d146..fd9747cf 100644 --- a/public/_locales/cs/messages.json +++ b/public/_locales/cs/messages.json @@ -810,5 +810,8 @@ }, "LearnMore": { "message": "Zjistit více" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Použijte kolečko myši při přechodu přes editační okno pro rychlou úpravu času. Kombinace kláves Ctrl nebo Shift mohou být použity k doladění změn." } } diff --git a/public/_locales/de/messages.json b/public/_locales/de/messages.json index 69ffc804..c2536ca6 100644 --- a/public/_locales/de/messages.json +++ b/public/_locales/de/messages.json @@ -183,7 +183,7 @@ "message": "Versteckt die Schaltflächen im YouTube-Videoplayer, um Segmente einzusenden." }, "showSkipButton": { - "message": "Behalte \"Zum Highlight springen\"-Knopf in der Navigationsleiste" + "message": "\"Zum Highlight springen\"-Knopf im Player behalten" }, "showInfoButton": { "message": "Zeige Info-Knopf im Youtube-Videoplayer" @@ -810,5 +810,8 @@ }, "LearnMore": { "message": "Erfahre mehr" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Benutze das Mausrad während der Mauszeiger über dem Eingabefeld schwebt um die Zeit schnell anzupassen. Benutze Strg bzw. Shift für gröbere/genauere Änderungen." } } diff --git a/public/_locales/es/messages.json b/public/_locales/es/messages.json index 818f1f9f..45c78f50 100644 --- a/public/_locales/es/messages.json +++ b/public/_locales/es/messages.json @@ -810,5 +810,8 @@ }, "LearnMore": { "message": "Aprenda Más" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Utilice la rueda del ratón mientras pasa el cursor por encima del cuadro de edición para ajustar el tiempo. Se pueden utilizar combinaciones de la tecla ctrl o shift para afinar los cambios." } } diff --git a/public/_locales/et/messages.json b/public/_locales/et/messages.json index 2eafbbba..8fdc05b8 100644 --- a/public/_locales/et/messages.json +++ b/public/_locales/et/messages.json @@ -765,5 +765,8 @@ }, "LearnMore": { "message": "Lisateave" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Kasuta hiirekursorit muutmiskasti kohal, et kiirelt aega reguleerida. Täpsemaks muutmiseks hoia kerimise ajal all Ctrl või Shift klahvi." } } diff --git a/public/_locales/fi/messages.json b/public/_locales/fi/messages.json index 7178988c..6c85a5ec 100644 --- a/public/_locales/fi/messages.json +++ b/public/_locales/fi/messages.json @@ -810,5 +810,8 @@ }, "LearnMore": { "message": "Opi lisää" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Käytä hiiren rullaa samalla kun osoitin on muokkauslaatikon päällä säätääksesi aikaa nopeasti. Ctrl- tai Shift-näppäimen yhdistelmiä voi käyttää muutoksien hienosäätelyyn." } } diff --git a/public/_locales/fr/messages.json b/public/_locales/fr/messages.json index 8854db09..e6500f75 100644 --- a/public/_locales/fr/messages.json +++ b/public/_locales/fr/messages.json @@ -182,6 +182,9 @@ "hideButtonsDescription": { "message": "Cela permet de cacher du lecteur YouTube les boutons utilisés pour soumettre des segments commerciaux. Je peux \ncomprendre que certaines personnes les trouvent perturbants. Au lieu d'utiliser ces boutons, cette fenêtre peut être utilisée \npour soumettre des segments commerciaux. Pour cacher la notification, utilisez le bouton \"Ne plus montrer\" sur la notification. Vous pouvez toujours réactiver ces paramètres plus tard." }, + "showSkipButton": { + "message": "Conserver le bouton \"Aller au point d'intérêt\" sur le lecteur" + }, "showInfoButton": { "message": "Montrer le bouton Info sur le lecteur YouTube" }, @@ -303,7 +306,7 @@ "message": "Passer {0} ?" }, "mute_category": { - "message": "Mute {0}?" + "message": "Mettre en sourdine {0} ?" }, "skip_to_category": { "message": "Passer à {0}?", @@ -648,7 +651,7 @@ "description": "Used when submitting segments to only let them select a certain category if they have it enabled in the options." }, "poiOnlyOneSegment": { - "message": "Avertissement: Ce type de segment peut avoir au maximum un seul actif à la fois. En soumettant plusieurs segments, un seul aléatoire sera affiché." + "message": "Avertissement : Ce type de segment ne peut avoir qu'un seul segment actif à la fois. Si vous en soumettez plusieurs, le choix sera fait au hasard." }, "youMustSelectACategory": { "message": "Vous devez sélectionner une catégorie pour tous les segments que vous soumettez !" @@ -732,6 +735,9 @@ "hideForever": { "message": "Cacher pour toujours" }, + "warningChatInfo": { + "message": "Vous avez reçu un avertissement et ne pouvez pas soumettre de segments temporairement. Cela signifie que nous avons remarqué que vous commettiez des erreurs courantes qui ne sont pas malveillantes. Veuillez simplement confirmer que vous comprenez les règles et nous supprimerons l'avertissement. Vous pouvez également rejoindre cette discussion en utilisant discord.gg/SponsorBlock ou matrix.to/#/#sponsor:ajay.app" + }, "voteRejectedWarning": { "message": "Le vote a été rejeté en raison d'un avertissement. Cliquez pour ouvrir un chat et y mettre fin , ou revenez plus tard lorsque vous avez le temps.", "description": "This is an integrated chat panel that will appearing allowing them to talk to the Discord/Matrix chat without leaving their browser." @@ -804,5 +810,8 @@ }, "LearnMore": { "message": "En savoir plus" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Utilisez la molette de votre souris en survolant la boîte d'édition pour ajuster rapidement le minutage. Les combinaisons de touches Ctrl ou Shift peuvent être utilisées pour affiner les modifications." } } diff --git a/public/_locales/id/messages.json b/public/_locales/id/messages.json index 0b44c6bf..35b3ec1c 100644 --- a/public/_locales/id/messages.json +++ b/public/_locales/id/messages.json @@ -53,7 +53,7 @@ "message": "Lewati Ulang" }, "unmute": { - "message": "Bunyikan" + "message": "Batalkan bisu" }, "paused": { "message": "Dijeda" @@ -89,7 +89,7 @@ "message": "Video YouTube tidak ditemukan.\nJika terjadi kesalahan, segarkan halaman." }, "refreshSegments": { - "message": "Segarkan segmen" + "message": "Perbarui segmen" }, "success": { "message": "Sukses!" @@ -182,6 +182,9 @@ "hideButtonsDescription": { "message": "Ini akan menyembunyikan tombol yang muncul di pemutar YouTube untuk mengirimkan segmen yang dilewati." }, + "showSkipButton": { + "message": "Tetap lewati ke tombol Highlight di Pemutar" + }, "showInfoButton": { "message": "Tampilkan Tombol Info Di Pemutar Video YouTube" }, @@ -207,7 +210,7 @@ "message": "Aktifkan Pelacakan Jumlah Lewati Pada Tab Privat/Penyamaran" }, "enableQueryByHashPrefix": { - "message": "Query By Hash Prefix" + "message": "Kueri dengan Hash Prefix" }, "whatQueryByHashPrefix": { "message": "Daripada meminta segmen dari server menggunakan videoID, 4 huruf pertama dari hash dari videoID dikirim. Server akan mengirim kembali data untuk semua video dengan hash yang mirip." @@ -224,6 +227,21 @@ "showSkipNotice": { "message": "Tampilkan pemberitahuan setelah melewati segmen" }, + "noticeVisibilityMode0": { + "message": "Lewati maklumat ukuran penuh" + }, + "noticeVisibilityMode1": { + "message": "Maklumat lewati kecil untuk lewati otomatis" + }, + "noticeVisibilityMode2": { + "message": "Lewati semua maklumat kecil" + }, + "noticeVisibilityMode3": { + "message": "Pudar maklumat lewati untuk semua lewati otomatis" + }, + "noticeVisibilityMode4": { + "message": "Lewati semua maklumat pudar" + }, "longDescription": { "message": "SponsorBlock membuat anda melewati sponsor, intro, outro, pengingat berlangganan dan segmen mengganggu lainnya di video YouTube. SponsorBlock adalah ekstensi browser crowdsourced yang membolehkan siapa saja mengirim waktu awal dan akhir dari segmen sponsor dan segmen video YouTube lainnya. Setelah seseorang mengirim informasi ini, orang lain yang memakai ekstensi ini akan melewati segmen sponsor di video yang sama. Anda juga dapat melewati bagian non-musik di musik video.", "description": "Full description of the extension on the store pages." @@ -383,7 +401,10 @@ "message": "Aktifkan dukungan Invidious, nonaktifkan lewati otomatis, tombol sembunyi dan lainnya." }, "addInvidiousInstance": { - "message": "Tambah Instance Klien Pihak Ketiga" + "message": "Tambah Instansi Klien Pihak Ketiga" + }, + "addInvidiousInstanceDescription": { + "message": "Tambahkan instansi khusus. Ini harus diformat Hanya dengan domain. Contoh: invidious.ajay.app" }, "add": { "message": "Tambah" @@ -406,6 +427,12 @@ "minDurationDescription": { "message": "Segmen yang lebih kecil dari nilai yang diatur tidak akan dilewati atau tampil di pemutar." }, + "skipNoticeDuration": { + "message": "Lewati maklumat berdurasi (detik):" + }, + "skipNoticeDurationDescription": { + "message": "Maklumat lewati akan tetap di layar setidaknya selama ini. Untuk lewati manual, mungkin akan terlihat lebih lama." + }, "shortCheck": { "message": "Submisi ini lebih pendek dari opsi durasi minimalmu. Ini dapat berarti ini sudah dikirim, dan hanya akan diabaikan karena opsi ini. Apakah anda yakin ingin mengirim?" }, @@ -545,6 +572,12 @@ "category_music_offtopic_short": { "message": "Non-Musik" }, + "category_poi_highlight": { + "message": "Sorotan" + }, + "category_poi_highlight_description": { + "message": "Bagian video yang banyak orang lihat. Sama untuk komentar \"Video dimulai di x\"." + }, "category_livestream_messages": { "message": "Livestream: Baca Pesan/Donasi" }, @@ -563,6 +596,9 @@ "disable": { "message": "Nonaktif" }, + "autoSkip_POI": { + "message": "Otomatis lewati ke awal" + }, "manualSkip_POI": { "message": "Tanya saat video dimuat" }, @@ -572,6 +608,9 @@ "autoSkipOnMusicVideos": { "message": "Lewati semua segmen secara otomatis ketika ada segmen non-music" }, + "muteSegments": { + "message": "Perbolehkan segmen untuk bisu daripada melewati" + }, "colorFormatIncorrect": { "message": "Warna anda tidak diformat dengan benar. Harusnya terdiri dari 3 atau 6 digit kode heksa dengan tagar di awal." }, @@ -611,6 +650,9 @@ "message": "Untuk mengirimkan segmen dengan kategori \"{0}\", Anda harus mengaktifkannya di opsi. Anda akan diarahkan ke opsi sekarang.", "description": "Used when submitting segments to only let them select a certain category if they have it enabled in the options." }, + "poiOnlyOneSegment": { + "message": "Perhatian: Tipe segmen ini hanya bisa maksimum aktif satu kali. Mengirimkan beberapa dapat mengakibatkan muncul pada kondisi acak." + }, "youMustSelectACategory": { "message": "Anda harus memilih kategori untuk semua segmen yang anda kirimkan!" }, @@ -686,9 +728,20 @@ "message": "Mengerti", "description": "Used as the button to dismiss a tooltip" }, + "experiementOptOut": { + "message": "Tidak ikut eksperimen masa depan", + "description": "This is used in a popup about a new experiment to get a list of unlisted videos to back up since all unlisted videos uploaded before 2017 will be set to private." + }, "hideForever": { "message": "Sembunyikan selamanya" }, + "warningChatInfo": { + "message": "Anda mendapatkan peringatan dan tidak bisa mengirim segmen sementara. Ini dikarenakan kami melihat kamu melakukan beberapa kesalahan yang umum, mohon konfirmasi bahwa kamu mengerti perundangan dan kami akan hapus peringatan. Kamu bisa bergabung ke obrolan menggunakan discord.gg/SponsorBlock atau matrix.io/#/#sponsor:ajay.app" + }, + "voteRejectedWarning": { + "message": "Suara ditolak karena peringatan. Klik untuk buka obrolan untuk menyelesaikannya, atau kembali beberapa saat lagi ketika ada waktu.", + "description": "This is an integrated chat panel that will appearing allowing them to talk to the Discord/Matrix chat without leaving their browser." + }, "Donate": { "message": "Donasi" }, @@ -701,7 +754,64 @@ "helpPageReviewOptions": { "message": "Haram ditinjau opsi di bawah ini" }, + "helpPageFeatureDisclaimer": { + "message": "Banyak fitur yang dinonaktifkan secara bawaan. Jika kamu ingin lewati mula, akhir, gunakan Invidious, dll, aktifkan mereka dibawah ini.\nKamu bisa menyembunyikan/menghadirkan elemen UI." + }, "helpPageHowSkippingWorks": { "message": "Cara kerja melewati segmen" + }, + "helpPageHowSkippingWorks1": { + "message": "Segmen video akan otomatis dilewati jika ditemukan di databasis. Kamu bisa buka munculan dengan klik ikon ekstensi untuk mendapatkan pratinjau apa adanya." + }, + "helpPageHowSkippingWorks2": { + "message": "Kapanpun kamu melewati segmen, kamu akan mendapatkan maklumat. Jika waktu terlihat salah dapat menyuarakan turun dengan klik turun-suara! Kamu juga bisa menyuarakan di maklumat." + }, + "Submitting": { + "message": "Mengirim" + }, + "helpPageSubmitting1": { + "message": "Mengirim bisa baik dilakukan di maklumat dengan menekan tombol \"Mulai Segmen Sekarang\" atau di pemutar video dengan tombol di pemutar." + }, + "helpPageSubmitting2": { + "message": "Klik tombol putar indikasikan memulai segmen dan klik tombol ikon stop indikasikan mengakhiri. Kamu bisa persiapkan beberapa sponsor sebelum menekan kirim. Klik tombol unggah akan mengirimkan. Klik tombol sampah akan menghapuskan." + }, + "Editing": { + "message": "Sunting" + }, + "helpPageEditing1": { + "message": "Jika kamu mengacaukan, kamu bisa sunting atau hapus segmen setelah klik tombol panah atas." + }, + "helpPageTooSlow": { + "message": "Ini terlalu lambat" + }, + "helpPageTooSlow1": { + "message": "Terdapat tombol pintas jika kamu ingin menggunakannya. Tekan tombol semikolon untuk indikasi mulai/akhir segmen sponsor dan tekan tombol kutip untuk mengirimkan. Ini bisa diganti di opsi. Jika kamu tidak menggunakan QWERTY, kamu dimungkinkan harus mengubah tombol." + }, + "helpPageCopyOfDatabase": { + "message": "Bisakah saya mendapatkan salinan Databasis? Apa yang terjadi jika kamu tiada?" + }, + "helpPageCopyOfDatabase1": { + "message": "Databasis adalah publik dan tersedia di" + }, + "helpPageCopyOfDatabase2": { + "message": "Sumber kode tersedia secara bebas. Jadi, jika sesuatu terjadi pada saya, pengajuan kamu tidak akan hilang." + }, + "helpPageNews": { + "message": "Berita dan bagaimana ini diciptakan" + }, + "helpPageSourceCode": { + "message": "Dimana saya mendapatkankan sumber kode?" + }, + "Credits": { + "message": "Kredit" + }, + "highlightNewFeature": { + "message": "Baru! Dapat ke poin video dengan satu klik dengan kategori highlight terbaru" + }, + "LearnMore": { + "message": "Pelajari Lebih Lanjut" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Gunakan roda mouse ketika berada di kotak edit untuk mengatur waktu dengan cepat. Kombinasi dengan tombol [Ctrl + Shift] bisa digunakan untuk perubahan yang halus." } } diff --git a/public/_locales/ko/messages.json b/public/_locales/ko/messages.json index 71c87191..d9bfa85b 100644 --- a/public/_locales/ko/messages.json +++ b/public/_locales/ko/messages.json @@ -810,5 +810,8 @@ }, "LearnMore": { "message": "더보기" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "편집 상자 위에 커서를 올린 채 스크롤하면 시간을 빠르게 조정할 수 있습니다. Ctrl이나 Shift 키를 누른 채로 스크롤하면 세밀한 조정이 가능합니다." } } diff --git a/public/_locales/nl/messages.json b/public/_locales/nl/messages.json index bcf27176..e4426460 100644 --- a/public/_locales/nl/messages.json +++ b/public/_locales/nl/messages.json @@ -810,5 +810,8 @@ }, "LearnMore": { "message": "Meer informatie" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Gebruik het muiswiel terwijl u over het invoerveld beweegt om de tijd snel aan te passen. Combinaties van de ctrl- of shift-toets kunnen worden gebruikt om de wijzigingen te verfijnen." } } diff --git a/public/_locales/ru/messages.json b/public/_locales/ru/messages.json index 9aa1e411..360ce5fc 100644 --- a/public/_locales/ru/messages.json +++ b/public/_locales/ru/messages.json @@ -183,7 +183,7 @@ "message": "Эта настройка скрывает кнопки для отправки сегментов, расположенные в плеере YouTube." }, "showSkipButton": { - "message": "Показывать кнопку \"Пропустить до важного\" в плеере" + "message": "Не скрывать кнопку \"Пропустить до важного\" в плеере YouTube" }, "showInfoButton": { "message": "Показывать кнопку информации в плеере YouTube" @@ -810,5 +810,8 @@ }, "LearnMore": { "message": "Узнать больше" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Наведите курсор на поле редактирования и используйте колесо мыши для быстрой настройки времени. Клавиши Ctrl или Shift могут быть использованы для точной настройки." } } diff --git a/public/_locales/sk/messages.json b/public/_locales/sk/messages.json index 863c2d0e..0273428f 100644 --- a/public/_locales/sk/messages.json +++ b/public/_locales/sk/messages.json @@ -182,6 +182,9 @@ "hideButtonsDescription": { "message": "Skryje tlačidlá pre preskočenie segmentov, ktoré sa zobrazujú v YouTube prehrávači." }, + "showSkipButton": { + "message": "Zobrazovať tlačidlo preskočiť na hlavný obsah videa" + }, "showInfoButton": { "message": "Zobraziť info tlačidlo v YouTube prehrávači" }, @@ -224,6 +227,21 @@ "showSkipNotice": { "message": "Zobraziť upozornenie pri preskočení segmentu" }, + "noticeVisibilityMode0": { + "message": "Veľké upozornenia o preskočení" + }, + "noticeVisibilityMode1": { + "message": "Malé upozornenia o automatickom preskočení" + }, + "noticeVisibilityMode2": { + "message": "Malé upozornenia o všetkých preskočeniach" + }, + "noticeVisibilityMode3": { + "message": "Priehľadné upozornenia o automatickom preskočení" + }, + "noticeVisibilityMode4": { + "message": "Priehľadné upozornenia o všetkých preskočeniach" + }, "longDescription": { "message": "SponsorBlock umožňuje preskočiť sponzorov, úvodné časti, záverečné časti, pripomienky na odber, nehudobné časti videoklipov alebo iné otravné časti YouTube videí. SponsorBlock je crowdsourceové rozšírenie prehliadača, pomocou ktorého môže ktokoľvek označiť začiatok a koniec takéhoto segmentu. Po odoslaní potom všetci ostatní s týmto rozšírením tieto segmenty automaticky preskočia.", "description": "Full description of the extension on the store pages." diff --git a/public/_locales/sv/messages.json b/public/_locales/sv/messages.json index 5a88a252..cefe4a85 100644 --- a/public/_locales/sv/messages.json +++ b/public/_locales/sv/messages.json @@ -182,6 +182,9 @@ "hideButtonsDescription": { "message": "Detta döljer knapparna på YouTube-spelaren som du kan skicka in segment med som ska hoppas över." }, + "showSkipButton": { + "message": "Behåll knappen hoppa till markerat på spelaren" + }, "showInfoButton": { "message": "Visa Infoknapp På YouTube-spelaren" }, @@ -807,5 +810,8 @@ }, "LearnMore": { "message": "Läs mer" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Använd mushjulet medan du håller muspekaren över redigeringsrutan för att snabbt justera tiden. Kombinationer av CTRL- eller SKIFT-tangenten kan användas för att finjustera tiden." } } diff --git a/public/_locales/ta/messages.json b/public/_locales/ta/messages.json index 16a34191..9913c228 100644 --- a/public/_locales/ta/messages.json +++ b/public/_locales/ta/messages.json @@ -52,6 +52,9 @@ "reskip": { "message": "ரெஸ்கிப்" }, + "unmute": { + "message": "ஒலியடக்கு" + }, "paused": { "message": "இடைநிறுத்தப்பட்டது" }, @@ -79,9 +82,15 @@ "sponsorEnd": { "message": "பிரிவு இப்போது முடிகிறது" }, + "sponsorCancel": { + "message": "உருவாக்கும் பகுதியை ரத்து செய்" + }, "noVideoID": { "message": "YouTube வீடியோ எதுவும் கிடைக்கவில்லை.\nஇது தவறாக இருந்தால், தாவலைப் புதுப்பிக்கவும்." }, + "refreshSegments": { + "message": "பிரிவுகளைப் புதுப்பிக்கவும்" + }, "success": { "message": "வெற்றி!" }, @@ -152,6 +161,9 @@ "setUsername": { "message": "பயனர்பெயரை அமைக்கவும்" }, + "copyPublicID": { + "message": "பொது பயனர் IDயை நகலெடுக்கவும்" + }, "discordAdvert": { "message": "பரிந்துரைகள் மற்றும் கருத்துக்களை வழங்க அதிகாரப்பூர்வ டிஸ்கார்ட் சேவையகத்தில் சேர வாருங்கள்!" }, @@ -170,12 +182,18 @@ "hideButtonsDescription": { "message": "ஸ்கிப் பிரிவுகளைச் சமர்ப்பிக்க YouTube பிளேயரில் தோன்றும் பொத்தான்களை இது மறைக்கிறது." }, + "showSkipButton": { + "message": "பிளேயரில் Skip To Highlight பொத்தானை வைக்கவும்" + }, "showInfoButton": { "message": "YouTube பிளேயரில் தகவல் பொத்தானைக் காட்டு" }, "hideInfoButton": { "message": "YouTube பிளேயரில் தகவல் பொத்தானை மறைக்கவும்" }, + "autoHideInfoButton": { + "message": "தகவல் பொத்தானை தானாக மறைக்கவும்" + }, "hideDeleteButton": { "message": "YouTube பிளேயரில் நீக்கு பொத்தானை மறைக்க" }, @@ -188,6 +206,9 @@ "whatViewTracking": { "message": "இந்த அம்சம் பயனர்கள் தங்கள் சமர்ப்பிப்பு மற்றவர்களுக்கு எவ்வளவு உதவியது மற்றும் ஸ்பேம் தரவுத்தளத்தில் வரவில்லை என்பதை உறுதிப்படுத்த அப்வோட்களுடன் ஒரு மெட்ரிக்காகப் பயன்படுத்தப்படுவதை பயனர்களுக்குத் தெரியப்படுத்த நீங்கள் எந்த பகுதிகளைத் தவிர்த்துவிட்டீர்கள் என்பதைக் கண்காணிக்கிறது. ஒவ்வொரு முறையும் நீங்கள் ஒரு பகுதியைத் தவிர்க்கும்போது நீட்டிப்பு சேவையகத்திற்கு ஒரு செய்தியை அனுப்புகிறது. பார்வை எண்கள் துல்லியமாக இருக்க பெரும்பாலான மக்கள் இந்த அமைப்பை மாற்ற மாட்டார்கள் என்று நம்புகிறோம். :)" }, + "enableViewTrackingInPrivate": { + "message": "தனிப்பட்ட/மறைநிலை தாவல்களில் ஸ்கிப் கவுண்ட் டிராக்கிங்கை இயக்கவும்" + }, "enableQueryByHashPrefix": { "message": "ஹாஷ் முன்னொட்டு மூலம் வினவல்" }, @@ -206,6 +227,21 @@ "showSkipNotice": { "message": "ஒரு பிரிவு தவிர்க்கப்பட்ட பிறகு அறிவிப்பைக் காட்டு" }, + "noticeVisibilityMode0": { + "message": "முழு அளவு தவிர்க்கும் அறிவிப்புகள்" + }, + "noticeVisibilityMode1": { + "message": "ஆட்டோ ஸ்கிப்பிற்கான சிறிய ஸ்கிப் அறிவிப்புகள்" + }, + "noticeVisibilityMode2": { + "message": "அனைத்து சிறிய தவிர்க்கும் அறிவிப்புகள்" + }, + "noticeVisibilityMode3": { + "message": "ஆட்டோ ஸ்கிப்பிற்கான மங்கலான தவிர்க்கும் அறிவிப்புகள்" + }, + "noticeVisibilityMode4": { + "message": "அனைத்து மங்கலான தவிர்க்கும் அறிவிப்புகள்" + }, "longDescription": { "message": "ஸ்பான்சர்கள், அறிமுகங்கள், அவுட்ரோஸ், சந்தா நினைவூட்டல்கள் மற்றும் YouTube வீடியோக்களின் பிற எரிச்சலூட்டும் பகுதிகளைத் தவிர்க்க ஸ்பான்சர் பிளாக் உங்களை அனுமதிக்கிறது. ஸ்பான்சர் பிளாக் என்பது ஒரு கூட்ட நெரிசலான உலாவி நீட்டிப்பாகும், இது ஸ்பான்சர் செய்யப்பட்ட பிரிவுகளின் தொடக்க மற்றும் இறுதி நேரங்களையும் YouTube வீடியோக்களின் பிற பிரிவுகளையும் எவரும் சமர்ப்பிக்கலாம். ஒரு நபர் இந்த தகவலைச் சமர்ப்பித்தவுடன், இந்த நீட்டிப்பு உள்ள மற்றவர்கள் ஸ்பான்சர் செய்யப்பட்ட பிரிவைத் தவிர்த்து விடுவார்கள். இசை வீடியோக்களின் இசை அல்லாத பிரிவுகளையும் நீங்கள் தவிர்க்கலாம்.", "description": "Full description of the extension on the store pages." @@ -229,6 +265,9 @@ "setSkipShortcut": { "message": "ஒரு பகுதியைத் தவிர்ப்பதற்கான விசையை அமைக்கவும்" }, + "setStartSponsorShortcut": { + "message": "துவக்க/நிறுத்த பிரிவு விசைப்பலகைக்கு விசையை அமைக்கவும்" + }, "setSubmitKeybind": { "message": "சமர்ப்பிக்கும் விசைப்பலகைக்கு விசையை அமைக்கவும்" }, @@ -260,9 +299,31 @@ "skip": { "message": "தவிர்" }, + "mute": { + "message": "ஒலியடக்கு" + }, "skip_category": { "message": "{0} ஐ தவிர்?" }, + "mute_category": { + "message": "{0} ஐ ஒலியடக்கவா?" + }, + "skip_to_category": { + "message": "{0} க்குச் செல்லவா?", + "description": "Used for skipping to things (Skip to Highlight)" + }, + "skipped": { + "message": "{0} தவிர்க்கப்பட்டது", + "description": "Example: Sponsor Skipped" + }, + "muted": { + "message": "{0} ஒலியடக்கப்பட்டது", + "description": "Example: Sponsor Muted" + }, + "skipped_to_category": { + "message": "{0} தவிர்க்கப்பட்டது", + "description": "Used for skipping to things (Skipped to Highlight)" + }, "disableAutoSkip": { "message": "ஆட்டோ ஸ்கிப்பை முடக்கு" }, @@ -311,6 +372,9 @@ "changeUserID": { "message": "உங்கள் பயனர் ஐடியை இறக்குமதி / ஏற்றுமதி செய்யுங்கள்" }, + "whatChangeUserID": { + "message": "இதை தனிப்பட்டதாக வைத்திருக்க வேண்டும். இது கடவுச்சொல் போன்றது, அதை யாருடனும் பகிரக்கூடாது. யாரிடமாவது இது இருந்தால், அவர் உங்களைப் போல் ஆள்மாறாட்டம் செய்யலாம். உங்கள் பொது பயனர் IDயை நீங்கள் தேடுகிறீர்களானால், பாப்அப்பில் உள்ள கிளிப்போர்டு ஐகானைக் கிளிக் செய்யவும்." + }, "setUserID": { "message": "UserID ஐ அமைக்கவும்" }, @@ -323,9 +387,25 @@ "keybindCurrentlySet": { "message": ". இது தற்போது அமைக்கப்பட்டுள்ளது:" }, + "supportOtherSites": { + "message": "3 வது தரப்பு YouTube-தளங்களை ஆதரிக்கவும்" + }, + "supportOtherSitesDescription": { + "message": "மூன்றாம் தரப்பு YouTube தளங்களை ஆதரிக்கவும். ஆதரவை இயக்க, நீங்கள் கூடுதல் அனுமதிகளை ஏற்க வேண்டும். இது Chrome மற்றும் பிற Chromium வகைகளில் தனிப்பட்ட தாவல்களில் வேலை செய்யாது.", + "description": "This replaces the 'supports Invidious' option because it now works on other YouTube sites such as Cloudtube" + }, + "supportedSites": { + "message": "ஆதரிக்கப்படும் தளங்கள்: " + }, "optionsInfo": { "message": "ஆக்கிரமிப்பு ஆதரவை இயக்கு, ஆட்டோஸ்கிப்பை முடக்கு, பொத்தான்களை மறை மற்றும் பலவற்றை." }, + "addInvidiousInstance": { + "message": "3 வது தரப்பு தளங்களை சேர்க்கவும்" + }, + "addInvidiousInstanceDescription": { + "message": "தனிப்பட்ட தளங்களை சேர்க்கவும். இது Domain வடிவமைப்பில் இருக்க வேண்டும். உதாரணம்: invidious.ajay.app" + }, "add": { "message": "சேர்" }, @@ -347,6 +427,12 @@ "minDurationDescription": { "message": "தொகுப்பு மதிப்பை விடக் குறைவான பகுதிகள் தவிர்க்கப்படாது அல்லது பிளேயரில் காண்பிக்கப்படாது." }, + "skipNoticeDuration": { + "message": "அறிவிப்பு காலத்தை தவிர்க்கவும் (வினாடிகள்):" + }, + "skipNoticeDurationDescription": { + "message": "தவிர்க்கும் அறிவிப்பு குறைந்தபட்சம் இவ்வளவு நேரம் திரையில் இருக்கும். மேனுவல் ஸ்கிப்பிங்கிற்கு, இது நீண்ட நேரம் தெரியும்." + }, "shortCheck": { "message": "பின்வரும் சமர்ப்பிப்பு உங்கள் குறைந்தபட்ச கால விருப்பத்தை விட குறைவாக உள்ளது. இது ஏற்கனவே சமர்ப்பிக்கப்பட்டுள்ளது என்பதையும், இந்த விருப்பத்தின் காரணமாக புறக்கணிக்கப்படுவதையும் இது குறிக்கலாம். நீங்கள் சமர்ப்பிக்க விரும்புகிறீர்களா?" }, @@ -404,6 +490,9 @@ "preview": { "message": "முன்னோட்ட" }, + "unsubmitted": { + "message": "சமர்ப்பிக்கப்படவில்லை" + }, "inspect": { "message": "ஆய்வு செய்யுங்கள்" }, @@ -468,6 +557,12 @@ "category_outro_description": { "message": "வரவுகளை அல்லது YouTube எண்ட்கார்டுகள் தோன்றும் போது. தகவலுடன் முடிவுகளுக்கு அல்ல." }, + "category_preview": { + "message": "முன்னோட்டம்/மறுபரிசீலனை" + }, + "category_preview_description": { + "message": "முந்தைய எபிசோடுகளின் விரைவான மறுபரிசீலனை அல்லது தற்போதைய வீடியோவில் பின்னர் என்ன வரப்போகிறது என்பதற்கான முன்னோட்டம். ஒன்றாக தொகுக்கப்பட்ட கிளிப்புகள், பேசப்பட்ட சுருக்கங்களுக்கு அல்ல." + }, "category_music_offtopic": { "message": "இசை: இசை அல்லாத பிரிவு" }, @@ -477,6 +572,12 @@ "category_music_offtopic_short": { "message": "இசை அல்லாதது" }, + "category_poi_highlight": { + "message": "முன்னிலைப்படுத்த" + }, + "category_poi_highlight_description": { + "message": "பெரும்பாலான மக்கள் தேடும் வீடியோவின் பகுதி. \"வீடியோ x இல் தொடங்குகிறது\" போன்றது." + }, "category_livestream_messages": { "message": "லைவ்ஸ்ட்ரீம்: நன்கொடை / செய்தி அளவீடுகள்" }, diff --git a/public/_locales/uk/messages.json b/public/_locales/uk/messages.json index 065ef22e..707a4f80 100644 --- a/public/_locales/uk/messages.json +++ b/public/_locales/uk/messages.json @@ -810,5 +810,8 @@ }, "LearnMore": { "message": "Дізнатися більше" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Навівши курсор на поле редагування, користуйтеся колесом прокрутки, щоб швидко відрегулювати час. Комбінації клавіш ctrl або shift можуть бути використані для точнішої настройки змін." } } diff --git a/public/_locales/vi/messages.json b/public/_locales/vi/messages.json index 9f23579c..3778d05f 100644 --- a/public/_locales/vi/messages.json +++ b/public/_locales/vi/messages.json @@ -182,6 +182,9 @@ "hideButtonsDescription": { "message": "Không hiển thị nút trên trình chạy video Youtube để đăng đoạn quảng cáo." }, + "showSkipButton": { + "message": "Giữ nút bỏ qua Highlight trên trình phát player" + }, "showInfoButton": { "message": "Hiển thị nút thông tin trên trình chạy video Youtube" }, @@ -302,6 +305,14 @@ "skip_category": { "message": "Bỏ qua {0}?" }, + "skipped": { + "message": "{0} đã bỏ qua", + "description": "Example: Sponsor Skipped" + }, + "muted": { + "message": "{0} đã ngắt tiếng (Muted)", + "description": "Example: Sponsor Muted" + }, "disableAutoSkip": { "message": "Tắt tự động bỏ qua" }, @@ -713,6 +724,9 @@ "hideForever": { "message": "Ẩn vĩnh viễn" }, + "warningChatInfo": { + "message": "Bạn đã nhận được một cảnh báo và tạm thời không thể gửi các phân đoạn. Bạn đã mắc lỗi trong việc tạo phân đoạn quá nhiều lần (có thể là chọn sai kiểu phân đoạn hoặc sai thời gian phân đoạn). Chúng tôi muốn bạn nhận ra điều đó để giúp bạn không mắc lỗi trong tương lai. Bạn có thể gặp các Vip User tại đây: discord.gg/SponsorBlock hoặc matrix.to/#/#sponsor:ajay.app. Bọn họ sẽ giúp bạn gỡ cảnh báo sau khi bạn đã hiểu ra lỗi sai của bạn" + }, "voteRejectedWarning": { "message": "Bỏ phiếu bị từ chối do có cảnh báo. Nhấp để mở cuộc trò chuyện để giải quyết hoặc quay lại sau.", "description": "This is an integrated chat panel that will appearing allowing them to talk to the Discord/Matrix chat without leaving their browser." @@ -741,7 +755,49 @@ "helpPageHowSkippingWorks2": { "message": "Bất cứ khi nào bỏ qua một phân đoạn, bạn sẽ nhận được 1 cửa sổ thông báo bât. Nếu phân đoạn có vẻ sai, hãy bỏ phiếu bằng cách nhấp vào nút downvote! Bạn cũng có thể bỏ phiếu trong cửa sổ bật lên khi nhấn vào biểu tượng tiện ích mở rộng. Và bạn có thể tắt việc hiển thị bảng thông báo này trong phần cài đặt tiện ích." }, + "Submitting": { + "message": "Gửi lên" + }, + "helpPageSubmitting1": { + "message": "Việc gửi một phân đoạn mới có thể được thực hiện trong cửa sổ bật lên bằng cách nhấn vào nút \"Đoạn quảng cáo bắt đầu vào lúc này\" hoặc trong trình phát video bằng các nút trên thanh trình phát." + }, + "helpPageSubmitting2": { + "message": "Bạn nhấp 1 lần vào nút \"Đoạn quảng cáo bắt đầu vào lúc này\" để bắt đầu 1 phân đoạn, nhấn 2 lần để đánh dấu kết thúc phân đoạn đó. Bạn có thể chuẩn bị nhiều phân đoạn trước khi nhấn gửi. Nhấp vào nút \"Đăng đoạn quảng cáo\" sẽ gửi. Nhấp vào nút \"Xoá đoạn quảng cáo\" để xóa." + }, + "Editing": { + "message": "Chỉnh sửa" + }, + "helpPageEditing1": { + "message": "Nếu bạn muốn chỉnh sửa thời gian phân đoạn hoặc kiểu của phân đoạn, bạn có thể chỉnh sửa hoặc xóa các phân đoạn của mình sau khi nhấp vào nút \"Đăng đoạn quảng cáo\"." + }, "helpPageTooSlow": { - "message": "Quá chậm" + "message": "Nếu như bạn cảm thấy thao tác ở trên quá chậm..." + }, + "helpPageTooSlow1": { + "message": "Bạn có thể sử dụng các hotkeys - phím nóng. Nhấn phím dấu chấm phẩy (;) để chỉ ra điểm bắt đầu / kết thúc của phân đoạn nhà tài trợ và nhấp vào dấu nháy đơn (') để gửi. Nếu bạn không sử dụng QWERTY, có lẽ bạn nên thay đổi keybinding bằng cách vào phần cài đặt của tiện ích." + }, + "helpPageCopyOfDatabase": { + "message": "Tôi có thể lấy bản sao của database không? Điều gì xảy ra nếu có chuyện tệ (server chết, chủ nhân trang web mất, ...)?" + }, + "helpPageCopyOfDatabase1": { + "message": "Database được công khai và luôn có sẵn tại " + }, + "helpPageCopyOfDatabase2": { + "message": "Mã nguồn mở cũng luôn có sẵn. Vì vậy, ngay cả khi có điều gì đó tệ, các phân đoạn cũng sẽ không biến mất." + }, + "helpPageNews": { + "message": "Tôi có thể cập nhật tin tức ở đâu?" + }, + "helpPageSourceCode": { + "message": "Bạn có thể tìm thấy source code ở đâu?" + }, + "Credits": { + "message": "Lời cảm ơn đến" + }, + "highlightNewFeature": { + "message": "Tính năng mới! Đi đến đoạn quan trọng của video chỉ với 1 cú click với dạng phân đoạn Highlight" + }, + "LearnMore": { + "message": "Tìm hiểu thêm" } } From 510db57666708a9cfaf643ac6632efb711a5cdd3 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Fri, 15 Oct 2021 19:29:15 -0400 Subject: [PATCH 36/36] bump version --- manifest/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest/manifest.json b/manifest/manifest.json index 3c49bebf..e79ef72e 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "SponsorBlock", - "version": "3.3.3", + "version": "3.4", "default_locale": "en", "description": "__MSG_Description__", "homepage_url": "https://sponsor.ajay.app",