From e4e453a11c776bb4127e07252f868c3e54e3e386 Mon Sep 17 00:00:00 2001 From: Michael C Date: Tue, 30 Nov 2021 15:55:26 -0500 Subject: [PATCH 01/44] add code to parse and filter --- .gitignore | 3 ++- package.json | 1 + src/ci/invidiousCI.ts | 50 +++++++++++++++++++++++++++++++++++++++ src/ci/invidiouslist.json | 1 + src/config.ts | 3 ++- 5 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 src/ci/invidiousCI.ts create mode 100644 src/ci/invidiouslist.json diff --git a/.gitignore b/.gitignore index 2833884c..3dcdb226 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ web-ext-artifacts .vscode/ dist/ tmp/ -.DS_Store \ No newline at end of file +.DS_Store +src/ci/data.json \ No newline at end of file diff --git a/package.json b/package.json index 2f59a888..963c1203 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "build:watch": "npm run build:watch:chrome", "build:watch:chrome": "webpack --env.browser=chrome --config webpack/webpack.dev.js --watch", "build:watch:firefox": "webpack --env.browser=firefox --config webpack/webpack.dev.js --watch", + "ci:invidious": "ts-node src/ci/invidiousCI.ts", "dev": "npm run build:dev && concurrently \"npm run web-run\" \"npm run build:watch\"", "dev:firefox": "npm run build:dev:firefox && concurrently \"npm run web-run:firefox\" \"npm run build:watch:firefox\"", "dev:firefox-android": "npm run build:dev:firefox && concurrently \"npm run web-run:firefox-android\" \"npm run build:watch:firefox\"", diff --git a/src/ci/invidiousCI.ts b/src/ci/invidiousCI.ts new file mode 100644 index 00000000..2c4a8089 --- /dev/null +++ b/src/ci/invidiousCI.ts @@ -0,0 +1,50 @@ +/* +This file is only ran by GitHub Actions in order to populate the Invidious instances list + +This file should not be shipped with the extension +*/ + +import { writeFile } from 'fs'; +import { join } from 'path'; + +// import file downloade from https://api.invidious.io/instances.json +import * as data from "./data.json"; + +type instanceMap = { + name: string, + url: string, + dailyRatios: {ratio: string, label: string }[], + thirtyDayUptime: string +}[] + +// only https servers +const mapped: instanceMap = data + // eslint-disable-next-line @typescript-eslint/no-explicit-any + .filter((i: any) => i[1]?.type === 'https') + // eslint-disable-next-line @typescript-eslint/no-explicit-any + .map((instance: any) => { + return { + name: instance[0], + url: instance[1].uri, + dailyRatios: instance[1].monitor.dailyRatios, + thirtyDayUptime: instance[1]?.monitor['30dRatio'].ratio, + } + }) + +// reliability and sanity checks +const reliableCheck = mapped + .filter((instance) => { + // 30d uptime >= 90% + const thirtyDayUptime = Number(instance.thirtyDayUptime) >= 90 + // available for at least 80/90 days + const dailyRatioCheck = instance.dailyRatios.filter(status => status.label !== "black") + return (thirtyDayUptime && dailyRatioCheck.length >= 80) + }) + // url includes name + .filter(instance => instance.url.includes(instance.name)) + +// finally map to array +const result: string[] = reliableCheck.map(instance => instance.name) +writeFile(join(__dirname, "./invidiouslist.json"), JSON.stringify(result), (err) => { + if (err) return console.log(err); +}) \ No newline at end of file diff --git a/src/ci/invidiouslist.json b/src/ci/invidiouslist.json new file mode 100644 index 00000000..905605d8 --- /dev/null +++ b/src/ci/invidiouslist.json @@ -0,0 +1 @@ +["yewtu.be","invidious.snopyta.org","vid.puffyan.us","invidious.kavin.rocks","invidio.xamh.de","invidious-us.kavin.rocks","inv.riverside.rocks","vid.mint.lgbt","youtube.076.ne.jp","invidious.namazso.eu"] \ No newline at end of file diff --git a/src/config.ts b/src/config.ts index 344a7b62..912f87dc 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,5 @@ import * as CompileConfig from "../config.json"; +import * as invidiousList from "../src/ci/invidiouslist.json"; import { Category, CategorySelection, CategorySkipOption, NoticeVisbilityMode, PreviewBarOption, SponsorTime, StorageChangesObject, UnEncodedSegmentTimes as UnencodedSegmentTimes } from "./types"; interface SBConfig { @@ -188,7 +189,7 @@ const Config: SBObject = { hideSkipButtonPlayerControls: false, hideDiscordLaunches: 0, hideDiscordLink: false, - invidiousInstances: ["invidious.snopyta.org"], + invidiousInstances: invidiousList, supportInvidious: false, serverAddress: CompileConfig.serverAddress, minDuration: 0, From dc47b9ffd2049e8a11e566dbf2753fbe59e17465 Mon Sep 17 00:00:00 2001 From: Michael C Date: Tue, 30 Nov 2021 16:44:42 -0500 Subject: [PATCH 02/44] appease CI/ webpack move to ci/ change triggers --- .github/workflows/updateInvidous.yml | 32 ++++++++++++++++++++++++++++ .gitignore | 2 +- {src/ci => ci}/invidiousCI.ts | 9 ++++++-- {src/ci => ci}/invidiouslist.json | 0 package.json | 2 +- src/config.ts | 2 +- 6 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/updateInvidous.yml rename {src/ci => ci}/invidiousCI.ts (86%) rename {src/ci => ci}/invidiouslist.json (100%) diff --git a/.github/workflows/updateInvidous.yml b/.github/workflows/updateInvidous.yml new file mode 100644 index 00000000..f43142c7 --- /dev/null +++ b/.github/workflows/updateInvidous.yml @@ -0,0 +1,32 @@ +name: update invidious +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' # check every month + +jobs: + check-list: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Download instance list + run: | + wget https://api.invidious.io/instances.json -O data.json + - name: "Run CI" + run: npm run ci:invidious + - name: setup git config + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + - name: "Commit new files" + run : | + if [ $(git status --porcelain=v1 2>/dev/null | wc -l) -ge 1 ] + then + echo "pushing changes" + git add invidiouslist.json + git commit -m "[CI] New Invidious List" + git push origin main + else + echo "no changes" + fi \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3dcdb226..2eafbe10 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ web-ext-artifacts dist/ tmp/ .DS_Store -src/ci/data.json \ No newline at end of file +ci/data.json \ No newline at end of file diff --git a/src/ci/invidiousCI.ts b/ci/invidiousCI.ts similarity index 86% rename from src/ci/invidiousCI.ts rename to ci/invidiousCI.ts index 2c4a8089..05cf8f8f 100644 --- a/src/ci/invidiousCI.ts +++ b/ci/invidiousCI.ts @@ -4,10 +4,15 @@ This file is only ran by GitHub Actions in order to populate the Invidious insta This file should not be shipped with the extension */ -import { writeFile } from 'fs'; +import { writeFile, existsSync } from 'fs'; import { join } from 'path'; -// import file downloade from https://api.invidious.io/instances.json +// import file from https://api.invidious.io/instances.json +if (!existsSync('./data.json')) { + process.exit(1); +} +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore import * as data from "./data.json"; type instanceMap = { diff --git a/src/ci/invidiouslist.json b/ci/invidiouslist.json similarity index 100% rename from src/ci/invidiouslist.json rename to ci/invidiouslist.json diff --git a/package.json b/package.json index 963c1203..62153f13 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "build:watch": "npm run build:watch:chrome", "build:watch:chrome": "webpack --env.browser=chrome --config webpack/webpack.dev.js --watch", "build:watch:firefox": "webpack --env.browser=firefox --config webpack/webpack.dev.js --watch", - "ci:invidious": "ts-node src/ci/invidiousCI.ts", + "ci:invidious": "ts-node ci/invidiousCI.ts", "dev": "npm run build:dev && concurrently \"npm run web-run\" \"npm run build:watch\"", "dev:firefox": "npm run build:dev:firefox && concurrently \"npm run web-run:firefox\" \"npm run build:watch:firefox\"", "dev:firefox-android": "npm run build:dev:firefox && concurrently \"npm run web-run:firefox-android\" \"npm run build:watch:firefox\"", diff --git a/src/config.ts b/src/config.ts index 912f87dc..814e95a6 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,5 +1,5 @@ import * as CompileConfig from "../config.json"; -import * as invidiousList from "../src/ci/invidiouslist.json"; +import * as invidiousList from "../ci/invidiouslist.json"; import { Category, CategorySelection, CategorySkipOption, NoticeVisbilityMode, PreviewBarOption, SponsorTime, StorageChangesObject, UnEncodedSegmentTimes as UnencodedSegmentTimes } from "./types"; interface SBConfig { From 33098ac6596dc7cd6b3eb31cf0df6e7f88d7f883 Mon Sep 17 00:00:00 2001 From: Michael C Date: Wed, 1 Dec 2021 17:48:07 -0500 Subject: [PATCH 03/44] migrate and populat on reset --- src/config.ts | 7 ++++++- src/options.ts | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/config.ts b/src/config.ts index 814e95a6..5cc3ee0b 100644 --- a/src/config.ts +++ b/src/config.ts @@ -189,7 +189,7 @@ const Config: SBObject = { hideSkipButtonPlayerControls: false, hideDiscordLaunches: 0, hideDiscordLink: false, - invidiousInstances: invidiousList, + invidiousInstances: ["invidious.snopyta.org"], // leave as default supportInvidious: false, serverAddress: CompileConfig.serverAddress, minDuration: 0, @@ -433,6 +433,11 @@ function migrateOldFormats(config: SBConfig) { if (config["previousVideoID"] !== undefined) { chrome.storage.sync.remove("previousVideoID"); } + + // populate invidiousInstances with new instances if 3p support is **DISABLED** + if (!config["supportInvidious"]) { + config["invidiousInstances"] = invidiousList + } } async function setupConfig() { diff --git a/src/options.ts b/src/options.ts index 8c5c3bca..f2d4ed4a 100644 --- a/src/options.ts +++ b/src/options.ts @@ -1,5 +1,6 @@ import Config from "./config"; import * as CompileConfig from "../config.json"; +import * as invidiousList from "../ci/invidiouslist.json"; // Make the config public for debugging purposes window.SB = Config; @@ -297,8 +298,8 @@ function invidiousInstanceAddInit(element: HTMLElement, option: string) { const resetButton = element.querySelector(".invidious-instance-reset"); resetButton.addEventListener("click", function() { if (confirm(chrome.i18n.getMessage("resetInvidiousInstanceAlert"))) { - // Set to a clone of the default - Config.config[option] = Config.defaults[option].slice(0); + // Set to CI populated list + Config.config[option] = invidiousList; } }); } From e16aae393fc73be147d863247a40a8f0f8a4e0e2 Mon Sep 17 00:00:00 2001 From: Michael C Date: Sat, 4 Dec 2021 23:16:26 -0500 Subject: [PATCH 04/44] also check against length --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 5cc3ee0b..f1e80057 100644 --- a/src/config.ts +++ b/src/config.ts @@ -435,7 +435,7 @@ function migrateOldFormats(config: SBConfig) { } // populate invidiousInstances with new instances if 3p support is **DISABLED** - if (!config["supportInvidious"]) { + if (!config["supportInvidious"] && config["invidiousInstances"].length !== invidiousList.length) { config["invidiousInstances"] = invidiousList } } From 9f9df9479bf6cf0bcdd838cb0433a394a1ec814c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hegymegi=20Kiss=20=C3=81ron?= Date: Sat, 11 Dec 2021 16:02:07 +0100 Subject: [PATCH 05/44] move audio notification to content.ts fixes #756 --- src/components/SkipNoticeComponent.tsx | 13 ------------- src/content.ts | 7 ++++++- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 6e8876ff..6dffccbd 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -74,7 +74,6 @@ class SkipNoticeComponent extends React.Component this.onMouseEnter() } > - - {(Config.config.audioNotificationOnSkip) && } ); } diff --git a/src/content.ts b/src/content.ts index c4bdafef..e4eaedb5 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1242,7 +1242,12 @@ function skipToTime({v, skipTime, skippingSegments, openNotice, forceAutoSkip, u break; } } - + } + + if (autoSkip && Config.config.audioNotificationOnSkip) { + const beep = new Audio(chrome.runtime.getURL("icons/beep.ogg")); + beep.volume = skipNoticeContentContainer().v.volume * 0.1; + beep.play(); } if (!autoSkip From 3d3b261f8f759852d8ea0bf34d4dc5a6127928d7 Mon Sep 17 00:00:00 2001 From: Aron HK Date: Sun, 12 Dec 2021 01:38:31 +0100 Subject: [PATCH 06/44] skipNoticeContentContainer().v -> video Co-authored-by: Ajay Ramachandran --- src/content.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index e4eaedb5..3bca3d8c 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1246,7 +1246,7 @@ function skipToTime({v, skipTime, skippingSegments, openNotice, forceAutoSkip, u if (autoSkip && Config.config.audioNotificationOnSkip) { const beep = new Audio(chrome.runtime.getURL("icons/beep.ogg")); - beep.volume = skipNoticeContentContainer().v.volume * 0.1; + beep.volume = video.volume * 0.1; beep.play(); } From 54001763a78ec17a060161417293c6accfb66fe0 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 15 Dec 2021 22:01:28 -0500 Subject: [PATCH 07/44] Don't hide userID option if not set Fix #1025 --- src/options.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/options.ts b/src/options.ts index 8c5c3bca..b345037a 100644 --- a/src/options.ts +++ b/src/options.ts @@ -512,15 +512,17 @@ function activatePrivateTextChange(element: HTMLElement) { // See if anything extra must be done switch (option) { case "userID": - utils.asyncRequestToServer("GET", "/api/userInfo", { - userID: Config.config[option], - values: ["warnings", "banned"] - }).then((result) => { - const userInfo = JSON.parse(result.responseText); - if (userInfo.warnings > 0 || userInfo.banned) { - setButton.classList.add("hidden"); - } - }); + if (Config.config[option]) { + utils.asyncRequestToServer("GET", "/api/userInfo", { + userID: Config.config[option], + values: ["warnings", "banned"] + }).then((result) => { + const userInfo = JSON.parse(result.responseText); + if (userInfo.warnings > 0 || userInfo.banned) { + setButton.classList.add("hidden"); + } + }); + } break; } From 8ade66d7b3d4bf422585c1e93884a7a34e24626f Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 22 Dec 2021 12:13:31 -0500 Subject: [PATCH 08/44] Fix skip notice deleting segments causing issues Fixes #1105 --- src/components/SkipNoticeComponent.tsx | 6 +++--- src/components/SubmissionNoticeComponent.tsx | 2 +- src/content.ts | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 6e8876ff..925660ec 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import * as CompileConfig from "../../config.json"; import Config from "../config" -import { Category, ContentContainer, CategoryActionType, SponsorHideType, SponsorTime, NoticeVisbilityMode, ActionType } from "../types"; +import { Category, ContentContainer, CategoryActionType, SponsorHideType, SponsorTime, NoticeVisbilityMode, ActionType, SponsorSourceType, SegmentUUID } from "../types"; import NoticeComponent from "./NoticeComponent"; import NoticeTextSelectionComponent from "./NoticeTextSectionComponent"; import SubmissionNotice from "../render/SubmissionNotice"; @@ -534,10 +534,10 @@ class SkipNoticeComponent extends React.Component(); elements.push( - Date: Sun, 26 Dec 2021 20:16:26 -0500 Subject: [PATCH 09/44] Remove filler update notice --- src/config.ts | 5 +++-- src/content.ts | 20 -------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/src/config.ts b/src/config.ts index 344a7b62..d6c412c6 100644 --- a/src/config.ts +++ b/src/config.ts @@ -51,7 +51,6 @@ interface SBConfig { locked: string }, scrollToEditTimeUpdate: boolean, - fillerUpdate: boolean, // What categories should be skipped categorySelections: CategorySelection[], @@ -203,7 +202,6 @@ const Config: SBObject = { autoHideInfoButton: true, autoSkipOnMusicVideos: false, scrollToEditTimeUpdate: false, // false means the tooltip will be shown - fillerUpdate: false, categorySelections: [{ name: "sponsor" as Category, @@ -392,6 +390,9 @@ function fetchConfig(): Promise { } function migrateOldFormats(config: SBConfig) { + if (config["fillerUpdate"] !== undefined) { + chrome.storage.sync.remove("fillerUpdate"); + } if (config["highlightCategoryAdded"] !== undefined) { chrome.storage.sync.remove("highlightCategoryAdded"); } diff --git a/src/content.ts b/src/content.ts index 529b3471..47f27f68 100644 --- a/src/content.ts +++ b/src/content.ts @@ -333,26 +333,6 @@ async function videoIDChange(id) { // Clear unsubmitted segments from the previous video sponsorTimesSubmitting = []; updateSponsorTimesSubmitting(); - - // Filler update - if (!Config.config.fillerUpdate) { - Config.config.fillerUpdate = true; - - utils.wait(getControls).then(() => { - const playButton = document.querySelector(".ytp-play-button") as HTMLElement; - const allCategories = ["sponsor", "intro", "outro", "selfpromo", "interaction"]; - if (playButton && allCategories.every((name) => Config.config.categorySelections.some((selection) => selection.name === name)) - && utils.getCategorySelection("filler") === undefined) { - new Tooltip({ - text: chrome.i18n.getMessage("fillerNewFeature"), - link: "https://wiki.sponsor.ajay.app/w/Filler_Tangent", - referenceNode: playButton.parentElement, - prependElement: playButton, - timeout: 10 - }); - } - }); - } } function handleMobileControlsMutations(): void { From 6aa1665d7cf7b9aa01e97f999c80ae4dc5874f50 Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 28 Dec 2021 14:50:12 -0500 Subject: [PATCH 10/44] Create pull request for invidious list instead of commit --- .github/workflows/updateInvidous.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/updateInvidous.yml b/.github/workflows/updateInvidous.yml index f43142c7..50bb9769 100644 --- a/.github/workflows/updateInvidous.yml +++ b/.github/workflows/updateInvidous.yml @@ -15,18 +15,12 @@ jobs: wget https://api.invidious.io/instances.json -O data.json - name: "Run CI" run: npm run ci:invidious - - name: setup git config - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - name: "Commit new files" - run : | - if [ $(git status --porcelain=v1 2>/dev/null | wc -l) -ge 1 ] - then - echo "pushing changes" - git add invidiouslist.json - git commit -m "[CI] New Invidious List" - git push origin main - else - echo "no changes" - fi \ No newline at end of file + + - name: Create pull request to update list + uses: peter-evans/create-pull-request@v3 + with: + commit-message: Update Invidious List + author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> + branch: ci/update_invidious_list + title: Update Invidious List + body: Automated Invidious list update \ No newline at end of file From 7b74307013fd56232ec84318456a8c355a86723f Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 28 Dec 2021 14:50:18 -0500 Subject: [PATCH 11/44] formatting --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index f1e80057..10671746 100644 --- a/src/config.ts +++ b/src/config.ts @@ -436,7 +436,7 @@ function migrateOldFormats(config: SBConfig) { // populate invidiousInstances with new instances if 3p support is **DISABLED** if (!config["supportInvidious"] && config["invidiousInstances"].length !== invidiousList.length) { - config["invidiousInstances"] = invidiousList + config["invidiousInstances"] = invidiousList; } } From e729e036cfc3be875d42ddebad84a6a5e40cc375 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 28 Dec 2021 14:51:14 -0500 Subject: [PATCH 12/44] New Crowdin updates (#1054) --- public/_locales/cs/messages.json | 10 +- public/_locales/da/messages.json | 448 ++++++++++++++++++++++++++++ public/_locales/de/messages.json | 8 + public/_locales/es/messages.json | 50 +++- public/_locales/et/messages.json | 8 + public/_locales/fi/messages.json | 8 + public/_locales/fr/messages.json | 30 +- public/_locales/he/messages.json | 4 + public/_locales/hr/messages.json | 154 +++++++++- public/_locales/hu/messages.json | 108 +++---- public/_locales/id/messages.json | 30 ++ public/_locales/it/messages.json | 3 + public/_locales/ko/messages.json | 12 +- public/_locales/nl/messages.json | 10 +- public/_locales/pl/messages.json | 20 ++ public/_locales/pt_BR/messages.json | 8 + public/_locales/ru/messages.json | 8 + public/_locales/sk/messages.json | 8 + public/_locales/sv/messages.json | 8 + public/_locales/uk/messages.json | 8 + public/_locales/vi/messages.json | 72 ++++- public/_locales/zh_TW/messages.json | 13 + 22 files changed, 937 insertions(+), 91 deletions(-) diff --git a/public/_locales/cs/messages.json b/public/_locales/cs/messages.json index e3408a8d..e68db0f0 100644 --- a/public/_locales/cs/messages.json +++ b/public/_locales/cs/messages.json @@ -263,7 +263,7 @@ "description": "The second line of the message displayed after the notice was upgraded." }, "setSkipShortcut": { - "message": "Nastavit klíč pro přeskočení segmentu" + "message": "Nastavit klávesu pro přeskočení segmentu" }, "setStartSponsorShortcut": { "message": "Nastavte klávesu pro spuštění/zastavení segmentu" @@ -837,5 +837,13 @@ }, "fillerNewFeature": { "message": "Novinka! Překakujte výplňové části a vtipy s kategorií výplň. Povolte ji v nastavení" + }, + "dayAbbreviation": { + "message": "d", + "description": "100d" + }, + "hourAbbreviation": { + "message": "h", + "description": "100h" } } diff --git a/public/_locales/da/messages.json b/public/_locales/da/messages.json index c7411441..45d959af 100644 --- a/public/_locales/da/messages.json +++ b/public/_locales/da/messages.json @@ -142,5 +142,453 @@ "submissionEditHint": { "message": "Sektionsredigering vises, når du klikker på afsend", "description": "Appears in the popup to inform them that editing has been moved to the video player." + }, + "popupHint": { + "message": "Tip: Du kan opsætte keybinds til indsendelse i indstillingerne" + }, + "clearTimesButton": { + "message": "Ryd Tider" + }, + "submitTimesButton": { + "message": "Indsend Tider" + }, + "publicStats": { + "message": "Dette bruges på siden med offentlige statistikker til at vise, hvor meget du har bidraget. Se det" + }, + "Username": { + "message": "Brugernavn" + }, + "setUsername": { + "message": "Angiv Brugernavn" + }, + "copyPublicID": { + "message": "Kopier Offentligt Bruger-ID" + }, + "discordAdvert": { + "message": "Kom til den officielle Discord-server for at give forslag og feedback!" + }, + "hideThis": { + "message": "Skjul dette" + }, + "Options": { + "message": "Indstillinger" + }, + "showButtons": { + "message": "Vis Knapper På YouTube-Afspiller" + }, + "hideButtons": { + "message": "Skjul Knapper På YouTube-Afspiller" + }, + "hideButtonsDescription": { + "message": "Dette skjuler knapperne, der vises på YouTube-afspilleren for indsende springe segmenter." + }, + "showSkipButton": { + "message": "Behold Knappen Spring Til Fremhævning På Afspilleren" + }, + "showInfoButton": { + "message": "Vis Info-Knap På YouTube-Afspiller" + }, + "hideInfoButton": { + "message": "Skjul Info-Knap På YouTube-Afspiller" + }, + "autoHideInfoButton": { + "message": "Auto-Skjul Info-Knap" + }, + "hideDeleteButton": { + "message": "Skjul Slet-Knappen på YouTube-Afspiller" + }, + "showDeleteButton": { + "message": "Vis Slet-Knappen på YouTube-Afspiller" + }, + "enableViewTracking": { + "message": "Aktiver Optælling Af Antal Spring Over" + }, + "whatViewTracking": { + "message": "Denne funktion registrerer hvilke segmenter, du har sprunget over, så brugere kan se, hvor meget deres bidrag har hjulpet andre, og bruges som en måleenhed sammen med upvotes for at sikre, at spam ikke kommer ind i databasen. Udvidelsen sender en besked til serveren hver gang, du springer et segment over. Forhåbentlig ændrer de fleste ikke denne indstilling, så visningstallene er korrete. :)" + }, + "enableViewTrackingInPrivate": { + "message": "Aktiver Optælling Af Antal Spring Over I Private-/Inkognitovinduer" + }, + "enableQueryByHashPrefix": { + "message": "Forespørg Efter Hashpræfiks" + }, + "whatQueryByHashPrefix": { + "message": "I stedet for at anmode om segmenter fra serveren ved hjælp af videoID'et, sendes de første 4 tegn i hashen af videoID'et. Serveren sender data tilbage for alle videoer med lignende hashes." + }, + "enableRefetchWhenNotFound": { + "message": "Opdater Segmenter På Nye Videoer" + }, + "whatRefetchWhenNotFound": { + "message": "Hvis videoen er ny, og der ikke er nogle segmenter fundet, vil den opdatere hvert par minutter, mens du ser." + }, + "showNotice": { + "message": "Vis Bemærkning Igen" + }, + "showSkipNotice": { + "message": "Vis Bemærkning Efter Et Segment Skippes" + }, + "noticeVisibilityMode0": { + "message": "Fuld Størrelse Skip-Bemærkninger" + }, + "noticeVisibilityMode1": { + "message": "Små Skip-Bemærkninger for Auto-Skip" + }, + "noticeVisibilityMode2": { + "message": "Alle Små Skip-Bemærkninger" + }, + "noticeVisibilityMode3": { + "message": "Faded Skip-Bemærkninger for Auto-Skip" + }, + "noticeVisibilityMode4": { + "message": "Alle Faded Skip-Bemærkninger" + }, + "longDescription": { + "message": "SponsoBlock lader dig skippe sponsorer, introer, outroer, abonnement påmindelser og andre irriterende dele af YouTube-Videoer. SponsorBlock er en crowdsourced browerudvidelse, hvor alle kan indsende start- og sluttidspunkter for sponsorerede og andre segmenter i YouTube-Videoer. Du kan også springe over de dele af musikvideoer, som ikke er musik.", + "description": "Full description of the extension on the store pages." + }, + "website": { + "message": "Hjemmeside", + "description": "Used on Firefox Store Page" + }, + "sourceCode": { + "message": "Kildekode", + "description": "Used on Firefox Store Page" + }, + "noticeUpdate": { + "message": "Meddelelsen er blevet opgraderet!", + "description": "The first line of the message displayed after the notice was upgraded." + }, + "noticeUpdate2": { + "message": "Hvis du stadig ikke kan lide det, så tryk på aldrig vis knappen.", + "description": "The second line of the message displayed after the notice was upgraded." + }, + "setSkipShortcut": { + "message": "Indstil tast for at springe et segment over" + }, + "setStartSponsorShortcut": { + "message": "Indstil tast til start/stop segment tastaturbinding" + }, + "setSubmitKeybind": { + "message": "Indstil tast til indsendelse tastaturbinding" + }, + "keybindDescription": { + "message": "Vælg en tast ved at skrive den" + }, + "keybindDescriptionComplete": { + "message": "Tastaturbindingen er blevet sat til: " + }, + "0": { + "message": "Forbindelsestimeout. Tjek din internetforbindelse. Hvis dit internet fungerer, er serveren sandsynligvis overbelastet eller nede." + }, + "disableSkipping": { + "message": "Spring over er aktiveret" + }, + "enableSkipping": { + "message": "Spring over er deaktiveret" + }, + "yourWork": { + "message": "Dit Arbejde", + "description": "Used to describe the section that will show you the statistics from your submissions." + }, + "502": { + "message": "Serveren virker at være overbelastet. Prøv igen om et par sekunder." + }, + "errorCode": { + "message": "Fejlkode: " + }, + "skip": { + "message": "Spring Over" + }, + "mute": { + "message": "Gør Tavs" + }, + "skip_category": { + "message": "Spring {0} over?" + }, + "mute_category": { + "message": "Gør {0} tavs?" + }, + "skip_to_category": { + "message": "Spring til {0}?", + "description": "Used for skipping to things (Skip to Highlight)" + }, + "skipped": { + "message": "{0} Sprunget Over", + "description": "Example: Sponsor Skipped" + }, + "muted": { + "message": "{0} Tavsgjort", + "description": "Example: Sponsor Muted" + }, + "skipped_to_category": { + "message": "Skipped til {0}", + "description": "Used for skipping to things (Skipped to Highlight)" + }, + "disableAutoSkip": { + "message": "Deaktiver Auto-Skip" + }, + "enableAutoSkip": { + "message": "Aktiver Auto-Skip" + }, + "audioNotification": { + "message": "Lydnofikation på Skip" + }, + "audioNotificationDescription": { + "message": "Lydnotifikation ved skip vil spille en lyd når et segment skippes. Hvis deaktiveret (eller auto-skip er deaktiveret) vil ingen lyd blive spillet." + }, + "showTimeWithSkips": { + "message": "Vis Tid Med Skip Fjernet" + }, + "showTimeWithSkipsDescription": { + "message": "Denne tid vises i parantes ved siden af den aktuelle tid under søgelinjen. Dette viser den totale videovarighed minus alle segmenter. Dette inkluderer segmenter markeret som kun \"Vis I Søgelinjen\"." + }, + "youHaveSkipped": { + "message": "Du har sprunget over " + }, + "youHaveSaved": { + "message": "Du har gemt dig selv " + }, + "minLower": { + "message": "minut" + }, + "minsLower": { + "message": "minutter" + }, + "hourLower": { + "message": "time" + }, + "hoursLower": { + "message": "timer" + }, + "youHaveSavedTime": { + "message": "Du har sparret folk" + }, + "youHaveSavedTimeEnd": { + "message": " af deres liv" + }, + "statusReminder": { + "message": "Tjek status.sponsor.ajay.app for serverstatus." + }, + "changeUserID": { + "message": "Importer/Eksporter Dit Bruger-ID" + }, + "whatChangeUserID": { + "message": "Dette bør holdes privat. Det er ligesom en adgangskode og bør ikke deles med nogen. Hvis nogen har dette, kan de udgive sig for at være dig. Hvis du leder efter dit offentlige bruger-ID, skal du klikke på udklipsholderikonet i popup-vinduet." + }, + "setUserID": { + "message": "Indstil Bruger-ID" + }, + "userIDChangeWarning": { + "message": "Advarsel: Ændring af Bruger-IDet er permanent. Er du sikker på, at du vil gøre det? Sørg for at sikkerhedskopiere din gamle for en sikkerheds skyld." + }, + "createdBy": { + "message": "Oprettet Af" + }, + "keybindCurrentlySet": { + "message": ". Det er i øjeblikket sat til:" + }, + "supportOtherSites": { + "message": "Understøtter tredjeparts YouTube sider" + }, + "supportOtherSitesDescription": { + "message": "Understøt tredjeparts YouTube klienter. For at aktivere understøttelse, skal du acceptere de ekstra tilladelser. Dette virker IKKE i inkognito på Chrome og andre Chromium varianter.", + "description": "This replaces the 'supports Invidious' option because it now works on other YouTube sites such as Cloudtube" + }, + "supportedSites": { + "message": "Understøttede Sider: " + }, + "optionsInfo": { + "message": "Aktiver Invidious understøttelse, deaktiver auto spring over, skjul knapper og mere." + }, + "addInvidiousInstance": { + "message": "Tilføj Tredjeparts Klientinstans" + }, + "addInvidiousInstanceDescription": { + "message": "Tilføj brugerdefineret instans. Dette skal formateres med KUN domænet. Eksempel: invidious.ajay.app" + }, + "add": { + "message": "Tilføj" + }, + "addInvidiousInstanceError": { + "message": "Dette er et ugyldigt domæne. Dette bør KUN omfatte domænedele. Eksempel: invidious.ajay.app" + }, + "resetInvidiousInstance": { + "message": "Nulstil Liste over Invidious-Instanser" + }, + "resetInvidiousInstanceAlert": { + "message": "Du er ved at nulstille listen over Invidious-instancer" + }, + "currentInstances": { + "message": "Nuværende Instans:" + }, + "minDuration": { + "message": "Minimumsvarighed (sekunder):" + }, + "minDurationDescription": { + "message": "Segmenter kortere end den indstillede værdi vil ikke blive sprunget over eller vist i spilleren." + }, + "skipNoticeDuration": { + "message": "Spring meddelelsesvarighed over (sekunder):" + }, + "save": { + "message": "Gem" + }, + "reset": { + "message": "Nulstil" + }, + "areYouSureReset": { + "message": "Er du sikker på, at du ønsker at nulstille dette?" + }, + "mobileUpdateInfo": { + "message": "m.youtube.com understøttes nu" + }, + "exportOptions": { + "message": "Importer/Eksporter Alle Indstillinger" + }, + "setOptions": { + "message": "Indstil Indstillinger" + }, + "confirmNoticeTitle": { + "message": "Indsend Segment" + }, + "submit": { + "message": "Indsend" + }, + "cancel": { + "message": "Annuller" + }, + "delete": { + "message": "Slet" + }, + "preview": { + "message": "Forhåndsvisning" + }, + "unsubmitted": { + "message": "Ikke Indsendt" + }, + "inspect": { + "message": "Undersøg" + }, + "edit": { + "message": "Rediger" + }, + "theKey": { + "message": "Tasten" + }, + "to": { + "message": "til", + "description": "Used between segments. Example: 1:20 to 1:30" + }, + "category_sponsor": { + "message": "Sponsor" + }, + "category_selfpromo": { + "message": "Ubetalt/Egen Markedsføring" + }, + "category_interaction": { + "message": "Påmindelse Om Interaktion (Abonnement)" + }, + "category_interaction_short": { + "message": "Påmindelse Om Interaktion" + }, + "category_intro": { + "message": "Pause/Intro-Animation" + }, + "category_intro_short": { + "message": "Pause" + }, + "category_outro": { + "message": "Slutkort/Kreditter" + }, + "category_preview": { + "message": "Forhåndsvisning/Opsamling" + }, + "skipOption": { + "message": "Spring Over Indstillinger", + "description": "Used on the options page to describe the ways to skip the segment (auto skip, manual, etc.)" + }, + "enableTestingServer": { + "message": "Aktiver Betatestserver" + }, + "bracketNow": { + "message": "(Nu)" + }, + "moreCategories": { + "message": "Flere Kategorier" + }, + "chooseACategory": { + "message": "Vælg en Kategori" + }, + "bracketEnd": { + "message": "(Slut)" + }, + "hiddenDueToDownvote": { + "message": "skjult: downvote" + }, + "hiddenDueToDuration": { + "message": "skjult: for kort" + }, + "acceptPermission": { + "message": "Accepter tilladelse" + }, + "permissionRequestSuccess": { + "message": "Tilladelsesandmodning lykkedes!" + }, + "permissionRequestFailed": { + "message": "Tilladelsesanmodning mislykkedes, klikkede du på afvis?" + }, + "downvoteDescription": { + "message": "Ukorrekt/Forkert Timing" + }, + "incorrectCategory": { + "message": "Skift Kategori" + }, + "multipleSegments": { + "message": "Adskillige Segmenter" + }, + "guidelines": { + "message": "Retningslinjer" + }, + "readTheGuidelines": { + "message": "Læs Retningslinjerne!!", + "description": "Show the first time they submit or if they are \"high risk\"" + }, + "categoryUpdate1": { + "message": "Kategorier er her!" + }, + "help": { + "message": "Hjælp" + }, + "GotIt": { + "message": "Forstået", + "description": "Used as the button to dismiss a tooltip" + }, + "experiementOptOut": { + "message": "Fravælg alle fremtidige eksperimenter", + "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": "Skjul for evigt" + }, + "Donate": { + "message": "Doner" + }, + "hideDonationLink": { + "message": "Skjul Donationslink" + }, + "helpPageThanksForInstalling": { + "message": "Tak for at installere SponsorBlock." + }, + "helpPageReviewOptions": { + "message": "Venligst gennemgå indstillingerne nedenfor" + }, + "helpPageHowSkippingWorks": { + "message": "Hvordan spring over virker" + }, + "Submitting": { + "message": "Indsendelse" + }, + "Editing": { + "message": "Redigering" } } diff --git a/public/_locales/de/messages.json b/public/_locales/de/messages.json index 48f6fbb9..61f6503e 100644 --- a/public/_locales/de/messages.json +++ b/public/_locales/de/messages.json @@ -837,5 +837,13 @@ }, "fillerNewFeature": { "message": "Neu! Überspringe Nebensächliches und Witze mit der Füller-Kategorie. Aktiviere sie in den Optionen" + }, + "dayAbbreviation": { + "message": "T", + "description": "100d" + }, + "hourAbbreviation": { + "message": "S", + "description": "100h" } } diff --git a/public/_locales/es/messages.json b/public/_locales/es/messages.json index a4501ea6..0974b0b9 100644 --- a/public/_locales/es/messages.json +++ b/public/_locales/es/messages.json @@ -4,7 +4,7 @@ "description": "Name of the extension." }, "Description": { - "message": "Salte todos los patrocinios, súplicas por suscripción y más en los vídeos de YouTube. Reporta secciones de patrocinio en los vídeos que veas para ahorrarle tiempo a los demás.", + "message": "Salte todos los sponsors, súplicas de suscripción y más en vídeos de YouTube. Reporta sponsors en los vídeos que veas para ahorrarle tiempo a los demás.", "description": "Description of the extension." }, "400": { @@ -26,13 +26,13 @@ "message": "segmentos" }, "upvoteButtonInfo": { - "message": "Votar a favor de esta sumisión" + "message": "Votar positivamente este envío" }, "reportButtonTitle": { - "message": "Denunciar" + "message": "Reportar" }, "reportButtonInfo": { - "message": "Denunciar esta sumisión como incorrecta." + "message": "Reportar este envío como incorrecto." }, "Dismiss": { "message": "Descartar" @@ -53,7 +53,7 @@ "message": "Volver a saltar" }, "unmute": { - "message": "Restaurar sonido" + "message": "Quitar silencio" }, "paused": { "message": "Pausado" @@ -156,7 +156,7 @@ "message": "Esto se utiliza en la página de estadísticas públicas para mostrar cuánto has contribuido. Véala" }, "Username": { - "message": "Usuario" + "message": "Nombre de Usuario" }, "setUsername": { "message": "Escoger Nombre De Usuario" @@ -204,7 +204,7 @@ "message": "Habilitar el conteo de omisiones" }, "whatViewTracking": { - "message": "Esta función rastrea los segmentos que se han saltado para que los usuarios sepan en qué medida sus aportes ayudaron a los demás y se utilizan como una métrica junto con los votos favorables para garantizar que no aparezca spam en la base de datos. La extensión envía un mensaje al servidor cada vez que se salta un segmento. Esperemos que la mayoría de la gente no cambie esta configuración para que los números de vista sean exactos. :)" + "message": "Esta función rastrea los segmentos que se han saltado para que los usuarios sepan en qué medida sus envíos ayudaron a los demás y se utilizan como una métrica junto con los votos positivos para garantizar que no aparezca spam en la base de datos. La extensión envía un mensaje al servidor cada vez que se salta un segmento. Esperemos que la mayoría de la gente no cambie esta configuración para que los números de vistas sean exactos. :)" }, "enableViewTrackingInPrivate": { "message": "Activar el seguimiento del número de saltos en las pestañas privadas/de incógnito" @@ -269,13 +269,13 @@ "message": "Establecer tecla para iniciar/detener un segmento" }, "setSubmitKeybind": { - "message": "Establecer botón de envío" + "message": "Establecer tecla para el envío" }, "keybindDescription": { - "message": "Seleccione un botón escribiéndolo" + "message": "Seleccione una tecla escribiéndola" }, "keybindDescriptionComplete": { - "message": "El botón se ha establecido a: " + "message": "Ese atajo de teclas se ha establecido como: " }, "0": { "message": "Tiempo de espera agotado. Compruebe su conexión a Internet. Si su internet está funcionando, el servidor probablemente esta sobrecargado o desconectado." @@ -434,7 +434,7 @@ "message": "El aviso de omisión permanecerá en la pantalla por lo menos este tiempo. Si la omisión es manual, podría ser visible por más tiempo." }, "shortCheck": { - "message": "La siguiente sumisión es más corto que su opción de duración mínima. Esto podría significar que esto ya se ha enviado y que simplemente se ha ignorado debido a esta opción. ¿Está seguro de que desea enviar?" + "message": "El siguiente envío es más corto que su opción de duración mínima. Esto podría significar que esto ya se ha enviado y que simplemente se ha ignorado debido a esta opción. ¿Está seguro de que desea enviar?" }, "showUploadButton": { "message": "Mostrar botón de subida" @@ -512,10 +512,10 @@ "message": "La información de depuración ha sido copiada al portapapeles. Siéntase libre de eliminar cualquier información que prefiera no compartir. Guarde esto en un archivo de texto o péguelo en el informe de errores." }, "theKey": { - "message": "El botón" + "message": "La tecla" }, "keyAlreadyUsed": { - "message": "está enlazado a otra acción. Por favor, seleccione otro botón." + "message": "está enlazada a otra acción. Por favor, seleccione otra tecla." }, "to": { "message": "a", @@ -525,7 +525,7 @@ "message": "Sponsor" }, "category_sponsor_description": { - "message": "Promoción pagada, referencias pagadas y anuncios directos. No para autopromoción o anuncios gratuitos a causas/creadores/sitios web/productos que les gusten." + "message": "Promoción pagada, recomendaciones pagadas y anuncios directos. No para promoción propia o anuncios gratuitos a causas/creadores/sitios web/productos que les gusten." }, "category_selfpromo": { "message": "Promoción Propia/No Remunerada" @@ -563,6 +563,15 @@ "category_preview_description": { "message": "Recapitulación rápida de los episodios anteriores, o una vista previa de lo que va a ocurrir más adelante en el vídeo actual. Está pensado para clips editados juntos, no para resúmenes hablados." }, + "category_filler": { + "message": "Tangente de Relleno" + }, + "category_filler_description": { + "message": "Escenas tangenciales añadidas solo para relleno o humor que no son necesarias para entender el contenido principal del video. Esto no debe incluir segmentos que proporcionen contexto o detalles de fondo." + }, + "category_filler_short": { + "message": "Relleno" + }, "category_music_offtopic": { "message": "Música: Sección sin musica" }, @@ -719,7 +728,7 @@ "message": "¡Las categorías están aquí!" }, "categoryUpdate2": { - "message": "Abre las opciones de saltarse intros, otros, mercantil, etc." + "message": "Abre las opciones de saltarse intros, outros, mercancía, etc." }, "help": { "message": "Ayuda" @@ -825,5 +834,16 @@ }, "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." + }, + "fillerNewFeature": { + "message": "¡Nuevo! Omite tangentes y bromas con la categoría de relleno. Habilítala en opciones" + }, + "dayAbbreviation": { + "message": "d", + "description": "100d" + }, + "hourAbbreviation": { + "message": "h", + "description": "100h" } } diff --git a/public/_locales/et/messages.json b/public/_locales/et/messages.json index e643db65..ab49f41b 100644 --- a/public/_locales/et/messages.json +++ b/public/_locales/et/messages.json @@ -816,5 +816,13 @@ }, "fillerNewFeature": { "message": "Uus! Jäta täitesisu ja naljad vahele täitesisu kategooriaga. Luba valikutes" + }, + "dayAbbreviation": { + "message": "p", + "description": "100d" + }, + "hourAbbreviation": { + "message": "t", + "description": "100h" } } diff --git a/public/_locales/fi/messages.json b/public/_locales/fi/messages.json index 96e9636a..02974d25 100644 --- a/public/_locales/fi/messages.json +++ b/public/_locales/fi/messages.json @@ -837,5 +837,13 @@ }, "fillerNewFeature": { "message": "Uutta! Ohita epäolennaiset kohdat ja vitsit täytesisältö kategorialla. Ota se käyttöön asetuksista" + }, + "dayAbbreviation": { + "message": "pv", + "description": "100d" + }, + "hourAbbreviation": { + "message": "t", + "description": "100h" } } diff --git a/public/_locales/fr/messages.json b/public/_locales/fr/messages.json index 56b2bc50..8c9c6aef 100644 --- a/public/_locales/fr/messages.json +++ b/public/_locales/fr/messages.json @@ -183,7 +183,7 @@ "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" + "message": "Conserver le bouton \"Aller au point essentiel\" sur le lecteur" }, "showInfoButton": { "message": "Montrer le bouton Info sur le lecteur YouTube" @@ -528,7 +528,7 @@ "message": "Promotion rémunérée, parrainage rémunéré et publicité directe. Pas pour l'autopromotion ou les présentations gratuites de causes, de créateurs, de sites web ou de produits qu'ils aiment." }, "category_selfpromo": { - "message": "Promotion non rémunérée/autopromotion" + "message": "Non rémunéré/autopromotion" }, "category_selfpromo_description": { "message": "Semblable au \"sponsor\", excepté pour la promotion non rémunérée ou l'auto-promotion. Cela inclut les marchandises, les dons et les informations sur leurs collaborateurs." @@ -563,6 +563,15 @@ "category_preview_description": { "message": "Résumé rapide des épisodes précédents, ou aperçu de ce qui se passera plus tard dans la vidéo en cours. Pour les plans collectifs édités, pas pour les résumés parlés." }, + "category_filler": { + "message": "Digressions" + }, + "category_filler_description": { + "message": "Des digressions ajoutées uniquement pour le remplissage ou l'humour qui ne sont pas requis pour comprendre le contenu principal de la vidéo. Cela ne devrait pas inclure des segments fournissant du contexte ou des détails de fond." + }, + "category_filler_short": { + "message": "Remplissage" + }, "category_music_offtopic": { "message": "Musique : Segment non musical" }, @@ -573,7 +582,7 @@ "message": "Hors musique" }, "category_poi_highlight": { - "message": "Surligner" + "message": "Point essentiel" }, "category_poi_highlight_description": { "message": "La partie de la vidéo que la plupart des gens veulent voir. Similaire à \"la vidéo commence à x mins\"." @@ -651,7 +660,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 ne peut avoir qu'un seul segment actif à la fois. Si vous en soumettez plusieurs, le choix sera fait au hasard." + "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é." }, "youMustSelectACategory": { "message": "Vous devez sélectionner une catégorie pour tous les segments que vous soumettez !" @@ -809,7 +818,7 @@ "message": "En savoir plus" }, "CopyDownvoteButtonInfo": { - "message": "Vote négatif et crée une copie locale que vous pouvez soumettre à nouveau" + "message": "Voter contre et crée une copie locale pour la resoumettre" }, "OpenCategoryWikiPage": { "message": "Ouvrez la page wiki de cette catégorie." @@ -825,5 +834,16 @@ }, "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." + }, + "fillerNewFeature": { + "message": "Nouveau ! Ignorer les digressions et les blagues avec la catégorie \"remplissage\". Activable dans les options" + }, + "dayAbbreviation": { + "message": "j", + "description": "100d" + }, + "hourAbbreviation": { + "message": "h", + "description": "100h" } } diff --git a/public/_locales/he/messages.json b/public/_locales/he/messages.json index 078e8373..6b28db96 100644 --- a/public/_locales/he/messages.json +++ b/public/_locales/he/messages.json @@ -152,6 +152,10 @@ "hideInfoButton": { "message": "החבא כפתור מידע בנגן YouTube" }, + "website": { + "message": "אתר", + "description": "Used on Firefox Store Page" + }, "sourceCode": { "message": "קוד מקור", "description": "Used on Firefox Store Page" diff --git a/public/_locales/hr/messages.json b/public/_locales/hr/messages.json index 790790b6..ae3f2ce8 100644 --- a/public/_locales/hr/messages.json +++ b/public/_locales/hr/messages.json @@ -128,7 +128,7 @@ "message": "Glasaj za isječak" }, "Submissions": { - "message": "Podnesci" + "message": "Prijava" }, "savedPeopleFrom": { "message": "Sačuvali ste ljude od" @@ -174,22 +174,34 @@ "message": "Opcije" }, "showButtons": { - "message": "Pokažite gumbove na YouTube Player-u" + "message": "Prikaži gumbe na YouTube Playeru" }, "hideButtons": { - "message": "Sakrite gumbove na YouTube Player-u" + "message": "Sakrij gumbe na YouTube playeru" }, "hideButtonsDescription": { - "message": "Ovo sakrije gumbove za pridonose segmenta za preskočiti koje se pokažu na YouTuve Player-u." + "message": "Ovo skriva gumbe koji se pojavljuju na YouTube playeru za slanje odsječaka za preskakanje." }, "showSkipButton": { - "message": "Ostavite gumb za preskakanje" + "message": "Zadržite gumb za preskakanje i označavanje na playeru" }, "showInfoButton": { - "message": "Pokažite gumb za Informacije na YouTube Player-u" + "message": "Prikaži gumb za informacije na YouTube Playeru" }, "hideInfoButton": { - "message": "Sakrijte gumb za Informacije na YouTube Player-u" + "message": "Sakrij gumb za informacije na YouTube Playeru" + }, + "autoHideInfoButton": { + "message": "Automatski sakrij info gumb" + }, + "hideDeleteButton": { + "message": "Sakrij gumb za brisanje na YouTube playeru" + }, + "showDeleteButton": { + "message": "Pokaži gumb za brisanje na YouTube sviraču" + }, + "enableViewTracking": { + "message": "Omogući brojanje preskakanja" }, "showSkipNotice": { "message": "Pokaži obavijest nakon preskakanja isječka" @@ -202,6 +214,9 @@ "message": "Izvorni kod", "description": "Used on Firefox Store Page" }, + "0": { + "message": "Veza istekla. Provjerite svoju internetski vezu. Ako vaš internet radi, poslužitelj je vjerojatno preopterećen ili nedostupan." + }, "disableSkipping": { "message": "Preskakanje je aktivirano" }, @@ -212,6 +227,9 @@ "message": "Tvoja slanja", "description": "Used to describe the section that will show you the statistics from your submissions." }, + "502": { + "message": "Čini se da je poslužitelj preopterećen. Pokušajte ponovno za nekoliko sekundi." + }, "errorCode": { "message": "Kȏd greške: " }, @@ -221,6 +239,17 @@ "skip_category": { "message": "Preskočiti {0}?" }, + "mute_category": { + "message": "Utišati {0}?" + }, + "skip_to_category": { + "message": "Preskočiti na {0}?", + "description": "Used for skipping to things (Skip to Highlight)" + }, + "skipped_to_category": { + "message": "Preskočeno na {0}", + "description": "Used for skipping to things (Skipped to Highlight)" + }, "disableAutoSkip": { "message": "Deaktiviraj automatsko preskakanje" }, @@ -239,6 +268,9 @@ "hoursLower": { "message": "h" }, + "statusReminder": { + "message": "Provjerite status.sponsor.ajay.app za status poslužitelja." + }, "setUserID": { "message": "Postavi UserID" }, @@ -251,6 +283,9 @@ "keybindCurrentlySet": { "message": ". Trenutno je postavljeno na:" }, + "supportedSites": { + "message": "Podržane stranice: " + }, "optionsInfo": { "message": "Omogući podržavanje Invidiousa, onemogući automatsko preskakanje, sakrij gumbe i drugo." }, @@ -275,12 +310,24 @@ "minDurationDescription": { "message": "Isječci kraći od postavljene vrijednosti neće biti preskočeni ili prikazani u playeru." }, + "skipNoticeDuration": { + "message": "Duljina trajanja obavijesti o preskakanju (sekunde):" + }, + "skipNoticeDurationDescription": { + "message": "Obavijest o preskakanju ostat će na zaslonu barem ovoliko dugo. Za ručno preskakanje može biti duže vidljivo." + }, + "customServerAddress": { + "message": "Adresa SponsorBlock poslužitelja" + }, "save": { "message": "Spremi" }, "reset": { "message": "Resetiraj" }, + "exportOptions": { + "message": "Uvezi/Izvezi sve postavke" + }, "setOptions": { "message": "Postavi opcije" }, @@ -299,15 +346,34 @@ "preview": { "message": "Pregledaj" }, + "unsubmitted": { + "message": "Neposlano" + }, "inspect": { "message": "Provjeri" }, "edit": { "message": "Uredi" }, + "copyDebugInformationOptions": { + "message": "Kopira informacije u međuspremnik koje treba dati razvojnom programeru kada otkrije grešku / kada to programer zatraži. Osjetljive informacije kao što su vaš korisnički ID, kanali s popisa dopuštenih i prilagođena adresa poslužitelja uklonjeni su. Međutim, sadrži informacije kao što su vaš korisnički agent, preglednik, operativni sustav i broj verzije proširenja. " + }, + "theKey": { + "message": "Tipka" + }, + "keyAlreadyUsed": { + "message": "je vezana za drugu radnju. Molimo odaberite drugu tipku." + }, + "to": { + "message": "do", + "description": "Used between segments. Example: 1:20 to 1:30" + }, "category_sponsor": { "message": "Sponzor" }, + "category_sponsor_description": { + "message": "Plaćene promocije, plaćene preporuke i izravne reklame. Nije za samopromociju ili besplatno pozivanje na događaje/kreatore/web stranice/proizvode koji im se sviđaju." + }, "category_selfpromo": { "message": "Neplaćena promocija ili samopromocija" }, @@ -332,6 +398,15 @@ "category_outro": { "message": "Završni kadrovi/Zasluge" }, + "category_preview": { + "message": "Pregled/Sažetak" + }, + "category_filler": { + "message": "Popuna tangenti" + }, + "category_filler_short": { + "message": "Popuna" + }, "category_music_offtopic": { "message": "Glazba: Ne-glazbeni dio" }, @@ -341,12 +416,28 @@ "category_music_offtopic_short": { "message": "Ne-glazbeni" }, + "category_poi_highlight": { + "message": "Istaknuto" + }, + "category_livestream_messages": { + "message": "Livestream: čitanje donacija/poruka" + }, + "category_livestream_messages_short": { + "message": "Čitanje poruka" + }, "autoSkip": { "message": "Automatsko preskakanje" }, "manualSkip": { "message": "Ručno preskakanje" }, + "muteSegments": { + "message": "Dopustite isječke koji isključuju zvuk umjesto da ga preskaču" + }, + "previewColor": { + "message": "Boja neposlanog", + "description": "Referring to submissions that have not been sent to the server yet." + }, "category": { "message": "Kategorija" }, @@ -354,6 +445,9 @@ "message": "Preskoči opciju", "description": "Used on the options page to describe the ways to skip the segment (auto skip, manual, etc.)" }, + "enableTestingServer": { + "message": "Omogućite poslužitelj za beta testiranje" + }, "bracketNow": { "message": "(sada)" }, @@ -363,6 +457,10 @@ "chooseACategory": { "message": "Odaberi kategoriju" }, + "enableThisCategoryFirst": { + "message": "Da biste poslali segmente s kategorijom \"{0}\", morate je omogućiti u postavkama. Sada ćete biti preusmjereni na postavke.", + "description": "Used when submitting segments to only let them select a certain category if they have it enabled in the options." + }, "youMustSelectACategory": { "message": "Moraš odabrati kategoriju za sve segmente koje šalješ!" }, @@ -372,6 +470,9 @@ "downvoteDescription": { "message": "Neispravno/krivo vrijeme" }, + "incorrectCategory": { + "message": "Promijenite kategoriju" + }, "nonMusicCategoryOnMusic": { "message": "Ovaj je video kategoriziran kao glazba. Je li stvarno ima sponzora? Ako je ovo zapravo „Ne-glazbeni segment”, otvori opcije proširenja i aktiviraj ovu kategoriju. Zatim ovaj segment možeš posalti kao „Ne-glazbeni” umjesto sponzora. Pročitaj smjernice ako nešto nije jasno." }, @@ -390,5 +491,44 @@ }, "categoryUpdate2": { "message": "Otvori opcije za preskakanje uvoda, kraja, proizvoda itd." + }, + "Donate": { + "message": "Doniraj" + }, + "helpPageThanksForInstalling": { + "message": "Hvala na instaliranju SponsorBlocka." + }, + "Submitting": { + "message": "Slanje" + }, + "helpPageSubmitting2": { + "message": "Klikom na gumb za reprodukciju označava se početak segmenta, a klik na ikonu za zaustavljanje označava kraj. Možete pripremiti više sponzora prije nego što pritisnete \"Pošalji\". Klikom na gumb za slanje bit će poslano. Klikom na kantu za smeće izbrisat će se." + }, + "Editing": { + "message": "Uređivanje" + }, + "helpPageTooSlow": { + "message": "Ovo je presporo" + }, + "helpPageSourceCode": { + "message": "Gdje mogu pronaći izvorni kod?" + }, + "Credits": { + "message": "Zasluge" + }, + "LearnMore": { + "message": "Saznajte više" + }, + "OpenCategoryWikiPage": { + "message": "Otvorite wiki stranicu ove kategorije." + }, + "CopyAndDownvote": { + "message": "Kopiraj i glasaj protiv" + }, + "ContinueVoting": { + "message": "Nastavite glasati" + }, + "ChangeCategoryTooltip": { + "message": "Ovo će se odmah primijeniti na vaše isječke" } } diff --git a/public/_locales/hu/messages.json b/public/_locales/hu/messages.json index 458728a1..7237938f 100644 --- a/public/_locales/hu/messages.json +++ b/public/_locales/hu/messages.json @@ -1,6 +1,6 @@ { "fullName": { - "message": "SponorBlock YouTube-ra - Szponzorok átugrására", + "message": "SponsorBlock YouTube-ra - Szponzorok átugrására", "description": "Name of the extension." }, "Description": { @@ -11,7 +11,7 @@ "message": "Szerver: Ez a kérés érvénytelen" }, "429": { - "message": "Túl sok szponzoridőt jelölt be ezen a videón. Biztos benne, hogy van ennyi?" + "message": "Túl sok szponzoridőt jelöltél be ezen a videón. Biztosan van ennyi?" }, "409": { "message": "Ez már korábban be lett küldve" @@ -44,7 +44,7 @@ "message": "Ne mutassa többé" }, "hitGoBack": { - "message": "Kattintson a visszaugrásra, hogy visszakerüljön oda, ahonnan ugrott." + "message": "Kattints a visszaugrásra, hogy visszakerülj oda, ahonnan ugrottál." }, "unskip": { "message": "Visszaugrás" @@ -62,13 +62,13 @@ "message": "Időzítő megállítva" }, "confirmMSG": { - "message": "Ahhoz, hogy értékeket szerkesszen, vagy töröljön kattintson az info gombra, vagy nyissa meg a bővítmény felugró ablakát a bővítmény ikonjával a jobb felső sarokban." + "message": "Az egyes értékek szerkesztéséhez vagy törléséhez kattints az info gombra, vagy nyisd meg a bővítmény felugró ablakát a bővítmény ikonjával a jobb felső sarokban." }, "clearThis": { - "message": "Biztosan törölni akarja?\n\n" + "message": "Biztosan törölni szeretnéd?\n\n" }, "Unknown": { - "message": "Hiba történt a szponzoridők bejelentésekor. Kérjük, próbálja újra." + "message": "Hiba történt a szponzoridők beküldésekor. Kérjük, próbáld újra később." }, "sponsorFound": { "message": "Ennek a videónak már vannak szegmensei az adatbázisban!" @@ -95,10 +95,10 @@ "message": "Siker!" }, "voted": { - "message": "Szavazott!" + "message": "Szavaztál!" }, "serverDown": { - "message": "Úgy tűnik a szerver nem működik. Kérjük, mihamarabb értesítse a fejlesztőket." + "message": "Úgy tűnik, a szerver nem működik. Kérjük, mihamarabb értesítsd a fejlesztőket!" }, "connectionError": { "message": "Kapcsolódási probléma merült fel. Hibakód: " @@ -113,10 +113,10 @@ "message": "Felugró ablak bezárása" }, "SubmitTimes": { - "message": "Szegmens beküldése" + "message": "Szegmensek beküldése" }, "submitCheck": { - "message": "Biztosan be akarja küldeni?" + "message": "Biztosan be akarod küldeni?" }, "whitelistChannel": { "message": "Csatorna fehérlistára tétele" @@ -137,7 +137,7 @@ "message": "Ranglista" }, "recordTimesDescription": { - "message": "Küldés" + "message": "Beküldés" }, "submissionEditHint": { "message": "A szegmens szerkesztés azután fog megjelenni, hogy a beküldésre kattintasz", @@ -153,7 +153,7 @@ "message": "Időpontok beküldése" }, "publicStats": { - "message": "Ezt használja a nyilvános ranglistán, hogy megmutassa mennyit járult hozzá. Nézze meg" + "message": "Ez a nyilvános ranglistán használatos, ami mutatja, mennyit segítettél. Nézd meg" }, "Username": { "message": "Felhasználónév" @@ -165,7 +165,7 @@ "message": "Nyilvános UserID másolása" }, "discordAdvert": { - "message": "Csatlakozzon a hivatalos discord szerverhez, hogy javaslatokat és visszajelzést adhasson!" + "message": "Gyere, csatlakozz a hivatalos discord szerverhez, hogy javaslatokat és visszajelzést adhass!" }, "hideThis": { "message": "Elrejtés" @@ -192,7 +192,7 @@ "message": "Info gomb elrejtése a YouTube lejátszón" }, "autoHideInfoButton": { - "message": "Automatikus elrejtése az Információ Gombnak" + "message": "Info gomb automatikus elrejtése" }, "hideDeleteButton": { "message": "Törlés gomb elrejtése a YouTube lejátszón" @@ -204,7 +204,7 @@ "message": "Átugrás-számláló követés bekapcsolása" }, "whatViewTracking": { - "message": "Ez a funkció követi, mely szegmenseket ugrotta át, hogy más felhasználók megtudhassák mennyit segítettek a bejelentéseik és a szavazatokkal együtt egy mértékegységként van használva, hogy ne kerülhessen spam az adatbázisba. A bővítmény küld egy üzenetet a szervernek, minden alkalommal, mikor átugrik egy szegmenst. Remélhetőleg nem sokan állítják át ezt a beállítást, hogy a számok pontosak maradhassanak. :)" + "message": "Ez a funkció követi, mely szegmenseket ugrottad át, hogy a felhasználók megtudhassák mennyit segítettek a bejelentéseik, és a szavazatokkal együtt egy mértékegységként van használva, hogy ne kerülhessen szemét az adatbázisba. A bővítmény küld egy üzenetet a szervernek, minden alkalommal, mikor átugrasz egy szegmenst. Remélhetőleg nem sokan állítják át ezt a beállítást, hogy a számok pontosak maradhassanak. :)" }, "enableViewTrackingInPrivate": { "message": "Átugrások számlálásának engedélyezése privát/inkognitó füleken" @@ -219,7 +219,7 @@ "message": "Szegmensek újrakeresése új videókon" }, "whatRefetchWhenNotFound": { - "message": "Ha a videó új, és még nem találhatóak szegmensek, a bővítmény pár percenkét újra keresi őket, miközben nézi." + "message": "Ha a videó új, és még nem találhatóak szegmensek, a bővítmény pár percenkét újra keresi őket, miközben nézed." }, "showNotice": { "message": "Értesítés megjelenítése ismét" @@ -243,7 +243,7 @@ "message": "Csak halvány átugrási értesítők" }, "longDescription": { - "message": "A SponsorBlock-al átugorhatja a szponzorokat, introkat, outrokat, feliratkozás emlékeztetőket és a YouTube videók többi idegesítő részeit. A SponsorBlock egy közösség által vezérelt böngészőbővítmény, ami lehetővé tesz bárkit arra, hogy megjelölhesse egy szponzor vagy más szegmens kezdő és végpontjait. Ha megosztja ezt az információt, mindenki más ennek a bővítménynek a birtokában egyenesen átugorja majd ezt a szponzorszegmenst. Emellett például a zene videók nem-zene részei is átugorhatóak.", + "message": "A SponsorBlockkal átugorhatja a szponzorokat, introkat, outrokat, feliratkozás emlékeztetőket és a YouTube videók többi idegesítő részeit. A SponsorBlock egy közösség által vezérelt böngészőbővítmény, ami lehetővé teszi bárkinek, hogy megjelölhesse egy szponzor vagy más szegmens kezdő és végpontjait. Amint valaki megosztja ezt az információt, mindenki más ennek a bővítménynek a birtokában egyenesen átugorja majd ezt a szponzorszegmenst. Emellett például a videóklipek nem-zene részei is átugorhatóak.", "description": "Full description of the extension on the store pages." }, "website": { @@ -259,7 +259,7 @@ "description": "The first line of the message displayed after the notice was upgraded." }, "noticeUpdate2": { - "message": "Ha még mindig nem tetszik, kattintson a ne mutassa többé gombra.", + "message": "Ha még mindig nem tetszik, kattints a ne mutassa többé gombra.", "description": "The second line of the message displayed after the notice was upgraded." }, "setSkipShortcut": { @@ -272,13 +272,13 @@ "message": "Billentyű beállítása a beküldés gombhoz" }, "keybindDescription": { - "message": "Válasszon billentyűt azzal, hogy lenyomja" + "message": "Válassz egy billentyűt azzal, hogy lenyomod" }, "keybindDescriptionComplete": { "message": "A funkció erre a billentyűre lett állítva: " }, "0": { - "message": "Kapcsolati időtúllépés. Ellenőrizze az internetkapcsolatot. Ha az internet működik, a kiszolgáló valószínűleg túlterhelt vagy leállt." + "message": "Kapcsolati időtúllépés. Ellenőrizd az internetkapcsolatodat! Ha az internet működik, a kiszolgáló valószínűleg túlterhelt vagy leállt." }, "disableSkipping": { "message": "Átugrás bekapcsolva" @@ -291,7 +291,7 @@ "description": "Used to describe the section that will show you the statistics from your submissions." }, "502": { - "message": "Úgy tűnik, hogy a szerver túlterhelt. Néhány másodperc múlva próbálkozzon újra." + "message": "Úgy tűnik, hogy a szerver túlterhelt. Próbálkozz újra néhány másodperc múlva." }, "errorCode": { "message": "Hibakód: " @@ -334,7 +334,7 @@ "message": "Hangjelzés átugráskor" }, "audioNotificationDescription": { - "message": "A hangjelzés átugráskor lejátszik egy hangot minden alkalommal amikor átugrik egy szegmenst. Ha kikapcsolja (vagy az auto átugrás ki van kapcsolva) nem lesz hangjelzés lejátszva." + "message": "A hangjelzés átugráskor lejátszik egy hangot minden alkalommal, amikor egy szegmens átugrásra kerül. Ha kikapcsolod (vagy az auto átugrás ki van kapcsolva), nem lesz hangjelzés lejátszva." }, "showTimeWithSkips": { "message": "Idő megtekintése az átugrandók nélkül" @@ -346,7 +346,7 @@ "message": "Átugrottál: " }, "youHaveSaved": { - "message": "Megtakarított magának " + "message": "Megtakarítottál magadnak: " }, "minLower": { "message": "perc" @@ -367,7 +367,7 @@ "message": " az életükből" }, "statusReminder": { - "message": "A szerver állapotához tekintse meg a status.sponsor.ajay.app oldalt." + "message": "A szerver állapotához tekintsd meg a status.sponsor.ajay.app oldalt." }, "changeUserID": { "message": "UserID importálása / exportálása" @@ -379,7 +379,7 @@ "message": "UserID beállítása" }, "userIDChangeWarning": { - "message": "Figyelem: A UserID megváltoztatása végleges. Biztosan szeretné megtenni? Minden esetben készítsen biztonsági másolatot a régiről." + "message": "Figyelem: A UserID megváltoztatása végleges. Biztosan szeretnéd megtenni? Minden esetben készíts biztonsági másolatot a régiről!" }, "createdBy": { "message": "Készítette" @@ -416,7 +416,7 @@ "message": "Invidious példányok listájának visszaállítása" }, "resetInvidiousInstanceAlert": { - "message": "Épp visszaállítja az Invidious példányok listát" + "message": "Az Invidious példányok listájának visszaállítására készülsz" }, "currentInstances": { "message": "Jelenlegi példányok:" @@ -428,13 +428,13 @@ "message": "A beállított értéknél rövidebb szegmenseket nem ugorja át és nem jeleníti meg a lejátszó." }, "skipNoticeDuration": { - "message": "Átugrási értesítés hossza (másodpercek):" + "message": "Átugrási értesítés hossza (másodpercekben):" }, "skipNoticeDurationDescription": { "message": "Az átugrási értesítés ennyi ideig marad a képernyőn. Manuális átugrásnál tovább is látható maradhat." }, "shortCheck": { - "message": "A következő szegmens rövidebb, mint az Ön által beállított minimális időtartam. Ez azt jelentheti, hogy már beküldhették, csak emiatt az opció miatt Önnek figyelmen kívül marad. Biztosan beküldi?" + "message": "A következő szegmens rövidebb, mint az általad beállított minimális időtartam. Ez azt jelentheti, hogy már beküldhették, csak emiatt az opció miatt nálad nem jelenik meg. Biztosan beküldöd?" }, "showUploadButton": { "message": "Feltöltés gomb megjelenítése" @@ -443,7 +443,7 @@ "message": "SponsorBlock szerver címe" }, "customServerAddressDescription": { - "message": "A SponsorBlock által használt cím a szerverre történő hívások kezdeményezésére szolgál.\nHacsak nincs saját szerverpéldánya, ezt nem szabad megváltoztatni." + "message": "A SponsorBlock által használt cím a szerverre történő hívások kezdeményezésére szolgál.\nHacsak nincs saját szerverpéldányod, ezt nem szabad megváltoztatni." }, "save": { "message": "Mentés" @@ -452,10 +452,10 @@ "message": "Visszaállítás" }, "customAddressError": { - "message": "A cím helytelenül van formázva. Győződjön meg róla, hogy http:// vagy https:// van az elején, és nem fordított perjeleket használ." + "message": "A cím helytelenül van formázva. Győződj meg róla, hogy http:// vagy https:// van az elején, és nincsenek perjelek a végén." }, "areYouSureReset": { - "message": "Biztosan vissza szeretné állítani?" + "message": "Biztosan vissza szeretnéd állítani?" }, "mobileUpdateInfo": { "message": "az m.youtube.com már támogatott" @@ -464,16 +464,16 @@ "message": "Összes beállítás importálása / exportálása" }, "whatExportOptions": { - "message": "Ez az össze beállítása JSON-ban. Ebbe bele tartozik a userID-ja, szóval csak ésszel ossza meg." + "message": "Ez az összes beállításod JSON formátumban. Ebbe bele tartozik a userID-d is, szóval csak ésszel oszd meg." }, "setOptions": { "message": "Beállítások módosítása" }, "exportOptionsWarning": { - "message": "Figyelem: Az beállítások megváltoztatása végleges, és tönkreteheti a bővítményét. Biztosan meg szeretné tenni? Készítsen egy biztonsági mentést a régi beállításairól, biztos, ami biztos." + "message": "Figyelem: A beállítások megváltoztatása végleges, és tönkreteheti a bővítményed. Biztosan meg szeretnéd tenni? Készíts egy biztonsági mentést a régi beállításaidról, biztos, ami biztos." }, "incorrectlyFormattedOptions": { - "message": "Ez a JSON helytelenül van formázva. A beállításai nem lettek megváltoztatva." + "message": "Ez a JSON helytelenül van formázva. A beállításaid nem lettek megváltoztatva." }, "confirmNoticeTitle": { "message": "Szegmens beküldése" @@ -506,16 +506,16 @@ "message": "Hiba a vágólapra másoláskor" }, "copyDebugInformationOptions": { - "message": "Információt másol a vágólapra, amit megadhat egy fejlesztőnek, ha bejelent egy hibát, vagy egy fejlesztő kéri öntől. Az érzékeny információkat, például a felhasználói azonosítót, az engedélyezőlistán szereplő csatornákat és az egyéni szerver címét eltávolítottuk. Azonban tartalmaz olyan információkat, mint a böngésző, az operációs rendszer és a bővítmény verziószáma. " + "message": "Információt másol a vágólapra, amit megadhatsz egy fejlesztőnek, ha bejelentesz egy hibát, vagy egy fejlesztő kéri tőled. Az érzékeny információkat, például a userID-t, az engedélyezőlistán szereplő csatornákat és az egyéni szerver címét eltávolítottuk. Azonban tartalmaz olyan információkat, mint a böngésző, az operációs rendszer és a bővítmény verziószáma. " }, "copyDebugInformationComplete": { - "message": "A hibakeresési információ másolva lett a vágólapjára. Nyugodtan távolítson el belőle olyan információkat, amiket nem szívesen osztana meg. Mentse el szöveges fájlként, vagy másolja a hibajelentésbe." + "message": "A hibakeresési információ másolva lett a vágólapjára. Nyugodtan távolíts el belőle olyan információkat, amiket nem szívesen osztanál meg. Mentsd el szöveges fájlként, vagy másold a hibajelentésbe." }, "theKey": { - "message": "A billentyű" + "message": "A(z)" }, "keyAlreadyUsed": { - "message": "már máshoz van állítva. Kérem, válasszon egy másik billentyűt." + "message": "billentyű már máshoz van állítva. Kérlek, válassz egy másik billentyűt." }, "to": { "message": "–", @@ -525,19 +525,19 @@ "message": "Szponzor" }, "category_sponsor_description": { - "message": "Fizetett promóció, vagy közvetlen reklám. Nem ön-promóció vagy ingyenes ajánlat (/shoutout) emberekről/termékekről/weboldalakról amik tetszenek nekik." + "message": "Fizetett promóció, vagy közvetlen reklám. Nem önpromóció vagy ingyenes ajánlat (shoutout) emberekről/termékekről/weboldalakról amik tetszenek nekik." }, "category_selfpromo": { - "message": "Nem fizetett/ön-promóció" + "message": "Nem fizetett/önpromóció" }, "category_selfpromo_description": { - "message": "Hasonló a szponzorhoz, de nem fizetett vagy ön-promóció. Beletartozik a saját ruhaáru, adományok, vagy infó arról hogy kivel működtek együtt." + "message": "Hasonló a szponzorhoz, de nem fizetett, vagy önpromóció. Beletartozik a saját ruhaáru, adományok, vagy infó arról, hogy kivel működtek együtt." }, "category_interaction": { "message": "Emlékeztető (Feliratkozás)" }, "category_interaction_description": { - "message": "Egy rövid emlékeztető arról, hogy likeoljunk, iratkozzunk fel, vagy kövessük a tartalom közben. Ha hosszabb szakasz, vagy egy adott témáról van, inkább a az ön-promóció alá tartozik." + "message": "Egy rövid emlékeztető arról, hogy likeoljunk, iratkozzunk fel, vagy kövessük a tartalom közben. Ha hosszabb szakasz, vagy egy adott témáról van, inkább az önpromóció alá tartozik." }, "category_interaction_short": { "message": "Emlékeztető" @@ -641,10 +641,10 @@ "message": "Bétateszt szerver bekapcsolása" }, "whatEnableTestingServer": { - "message": "A hozzájárulásai/szavazatai NEM FOGNAK SZÁMÍTANI a fő szerveren. Csak tesztelésre használja." + "message": "A beküldéseid és szavazataid NEM FOGNAK SZÁMÍTANI a fő szerveren. Csak tesztelésre használd." }, "testingServerWarning": { - "message": "Az összes hozzájárulás/szavazat NEM FOG SZÁMÍTANI a fő szerverhez, amíg a tesztszerverhez kapcsolódik. Győződjön meg róla, hogy ki van kapcsolva, ha valódi hozzájárulásokat szeretne megosztani." + "message": "Egyik beküldésed vagy szavazatod SEM FOG SZÁMÍTANI a fő szerverhez, amíg a tesztszerverhez kapcsolódsz. Győződj meg róla, hogy ki van kapcsolva, ha valódi beküldéseket akarsz végezni." }, "bracketNow": { "message": "(Most)" @@ -653,7 +653,7 @@ "message": "További kategóriák" }, "chooseACategory": { - "message": "Válasszon kategóriát" + "message": "Válassz egy kategóriát" }, "enableThisCategoryFirst": { "message": "Hogy \"{0}\" kategóriájú szegmenst küldhess be, először engedélyezned kell a beállításokban. Most átirányításra kerülsz a beállításokhoz.", @@ -663,7 +663,7 @@ "message": "Figyelem: Az ilyen típusú szegmensekből egyszerre csak egy lehet aktív. Több beküldése esetén véletlenszerűen az egyik fog megjelenni." }, "youMustSelectACategory": { - "message": "Minden szegmenshez kategóriát kell választania beküldés előtt!" + "message": "Minden szegmenshez kategóriát kell választani beküldés előtt!" }, "bracketEnd": { "message": "(Vége)" @@ -700,7 +700,7 @@ "message": "Csatorna ellenőrzése átugrás előtt" }, "whatForceChannelCheck": { - "message": "Alapértelmezett állapotban, a bővítmény átugorhat szegmenseket, mielőtt tudná melyik csatornán van. Alapból ezért, néhány szegmens, ami a videók legelején van, engedélyezett csatornákon is átugródhat. Ennek a bekapcsolásával ez elkerülhető, de minden átugrás előtt lesz egy kis késleltetés, hiszen a channelID megszerzéséhez elkell egy kis idő. Ez a késleltetés akár észrevehetetlen is lehet, ha elég gyors a kapcsolata." + "message": "Alapértelmezett állapotban a bővítmény átugorhat szegmenseket, mielőtt tudná melyik csatornán van. Alapból ezért néhány videó eleji szegmens engedélyezett csatornákon is átugródhat. Ennek a bekapcsolásával ez elkerülhető, de minden átugrás előtt lesz egy kis késleltetés, hiszen a channelID megszerzéséhez kell egy kis idő. Ez a késleltetés akár észrevehetetlen is lehet, ha elég gyors a kapcsolatod." }, "forceChannelCheckPopup": { "message": "Fontold meg a \"Csatorna ellenőrzése átugrás előtt\" bekapcsolását" @@ -712,7 +712,7 @@ "message": "Kategória módosítása" }, "nonMusicCategoryOnMusic": { - "message": "Ez a videó zeneként van kategorizálva. Biztos benne, hogy ennek van szponzora? Ha ez valójában egy \"nem-zene szegmens\", nyissa meg a bővítmény beállításait és kapcsolja be azt a kategóriát. Ezt követően elküldheti ezt a szegmenst \"nem-zene\"-ként szponzor helyett. Amennyiben nem érti, kérjük olvassa el az irányelveket." + "message": "Ez a videó zeneként van kategorizálva. Biztos vagy benne, hogy ennek van szponzora? Ha ez valójában egy \"nem-zene szegmens\", nyisd meg a bővítmény beállításait és kapcsold be ezt a kategóriát. Ezt követően beküldheted a szegmenst \"nem-zene\"-ként szponzor helyett. Ha nem érthető, kérjük olvasd el az irányelveket." }, "multipleSegments": { "message": "Több szegmens" @@ -721,14 +721,14 @@ "message": "Irányelvek" }, "readTheGuidelines": { - "message": "Olvassa el az irányelveket!!", + "message": "Olvasd el az irányelveket!!", "description": "Show the first time they submit or if they are \"high risk\"" }, "categoryUpdate1": { "message": "Itt vannak a kategóriák!" }, "categoryUpdate2": { - "message": "Nyissa meg a beállításokat, hogy átugorhasson introkat, outrokat stb." + "message": "Nyisd meg a beállításokat, hogy átugorhass introkat, outrokat stb." }, "help": { "message": "Segítség" @@ -837,5 +837,13 @@ }, "fillerNewFeature": { "message": "Új! Ugorj át vicceket és a témához nem tartozó részeket a töltelék kategóriával. Engedélyezd a beállításokban" + }, + "dayAbbreviation": { + "message": "n", + "description": "100d" + }, + "hourAbbreviation": { + "message": "ó", + "description": "100h" } } diff --git a/public/_locales/id/messages.json b/public/_locales/id/messages.json index 49f65fa6..ed619638 100644 --- a/public/_locales/id/messages.json +++ b/public/_locales/id/messages.json @@ -563,6 +563,15 @@ "category_preview_description": { "message": "Rekapan singkat dari episode sebelumnya, atau pratinjau tentang apa yang akan terjadi nanti di video. Dimaksudkan untuk klip bersama yang di edit, bukan ringkasan yang diucapkan." }, + "category_filler": { + "message": "Pengisi Tangensial" + }, + "category_filler_description": { + "message": "Adegan tangensial ditambahkan hanya untuk pengisi atau humor yang tidak diperlukan untuk memahami isi utama video. Ini tidak boleh mencakup segmen yang memberikan detail konteks atau latar belakang." + }, + "category_filler_short": { + "message": "Isian" + }, "category_music_offtopic": { "message": "Musik: Bagian Non-Musik" }, @@ -699,6 +708,9 @@ "downvoteDescription": { "message": "Salah, Waktu Tidak Tepat" }, + "incorrectCategory": { + "message": "Ubah Kategori" + }, "nonMusicCategoryOnMusic": { "message": "Video ini dikategorikan sebagai musik. Apakah anda yakin ini berisi sponsor? Jika ini ternyata adalah \"Segmen non-musik\", buka pengaturan ekstensi dan aktifkan kategorinya. Lalu, anda bisa mengirim segmen ini sebagai \"Non-musik\" bukannya sponsor. Harap membaca panduan jika anda kebingungan." }, @@ -805,7 +817,25 @@ "LearnMore": { "message": "Pelajari Lebih Lanjut" }, + "CopyDownvoteButtonInfo": { + "message": "Menurunkan suara dan membuat salinan lokal untuk Anda kirim ulang" + }, + "OpenCategoryWikiPage": { + "message": "Membuka halaman wiki kategori ini." + }, + "CopyAndDownvote": { + "message": "Salin dan berikan turunkan suara" + }, + "ContinueVoting": { + "message": "Lanjutkan Memvoting" + }, + "ChangeCategoryTooltip": { + "message": "Ini akan menerapkan ke segmen Anda" + }, "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." + }, + "fillerNewFeature": { + "message": "Baru! Lewati tangen dan lelucon dengan kategori pengisi. Aktifkan dalam opsi" } } diff --git a/public/_locales/it/messages.json b/public/_locales/it/messages.json index 3174e71b..42cb7c2c 100644 --- a/public/_locales/it/messages.json +++ b/public/_locales/it/messages.json @@ -834,5 +834,8 @@ }, "SponsorTimeEditScrollNewFeature": { "message": "Usa la rotellina del mouse passando sulla casella di modifica per regolare rapidamente il tempo. Le combinazioni dei tasti ctrl o shift sono utilizzabili per perfezionare le modifiche." + }, + "fillerNewFeature": { + "message": "Novità! Salta battute e tergiversazioni con il riempitivo. Attivala nelle opzioni" } } diff --git a/public/_locales/ko/messages.json b/public/_locales/ko/messages.json index 91d7aba2..43160f87 100644 --- a/public/_locales/ko/messages.json +++ b/public/_locales/ko/messages.json @@ -818,13 +818,13 @@ "message": "더보기" }, "CopyDownvoteButtonInfo": { - "message": "반대에 투표한 뒤 다시 제출할 수 있도록 미제출 사본을 생성합니다" + "message": "비추천에 투표한 뒤 다시 제출할 수 있도록 미제출 사본을 생성합니다" }, "OpenCategoryWikiPage": { "message": "해당 카테고리의 위키 페이지를 엽니다." }, "CopyAndDownvote": { - "message": "복사 및 반대" + "message": "복사 및 비추천" }, "ContinueVoting": { "message": "계속 투표" @@ -837,5 +837,13 @@ }, "fillerNewFeature": { "message": "새 기능! 쓸데없는 말이나 농담 구간을 잡담 카테고리로 건너 뛰세요. 설정에서 활성화하세요" + }, + "dayAbbreviation": { + "message": "일", + "description": "100d" + }, + "hourAbbreviation": { + "message": "시간", + "description": "100h" } } diff --git a/public/_locales/nl/messages.json b/public/_locales/nl/messages.json index 3cfa008a..ba0f70d2 100644 --- a/public/_locales/nl/messages.json +++ b/public/_locales/nl/messages.json @@ -836,6 +836,14 @@ "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." }, "fillerNewFeature": { - "message": "Nieuw! Sla zijsporen en grapjes over met de opvulling-categorie. Schakel in via opties" + "message": "Nieuw! Zijsporen en grapjes overslaan met de opvulling-categorie. Inschakelen via opties" + }, + "dayAbbreviation": { + "message": " d", + "description": "100d" + }, + "hourAbbreviation": { + "message": " h", + "description": "100h" } } diff --git a/public/_locales/pl/messages.json b/public/_locales/pl/messages.json index 158246f7..997f378c 100644 --- a/public/_locales/pl/messages.json +++ b/public/_locales/pl/messages.json @@ -563,6 +563,15 @@ "category_preview_description": { "message": "Szybkie podsumowanie poprzednich odcinków lub podgląd tego, co pojawia się później w bieżącym filmie. Dotyczy zmontowanych klipów, a nie ustnych podsumowań." }, + "category_filler": { + "message": "Filtr nietematyczny" + }, + "category_filler_description": { + "message": "Sceny nietematyczne dodawane tylko dla wypełniacza lub humoru, które nie są wymagane do zrozumienia głównej treści wideo. Nie powinno to obejmować segmentów zawierających informacje kontekstowe lub szczegółowe." + }, + "category_filler_short": { + "message": "Wypełniacz" + }, "category_music_offtopic": { "message": "Muzyka: Sekcja niemuzyczna" }, @@ -825,5 +834,16 @@ }, "SponsorTimeEditScrollNewFeature": { "message": "Użyj scroll'a myszy po najechaniu nad pole edycji, aby szybko dostosować czas. Kombinacje z ctrl'em i shift'em mogą być użyte, aby doszlifować zmiany." + }, + "fillerNewFeature": { + "message": "Nowość! Pomiń nietematyczne sceny i żarty z kategorią wypełnienia. Włącz w opcjach" + }, + "dayAbbreviation": { + "message": "d", + "description": "100d" + }, + "hourAbbreviation": { + "message": "h", + "description": "100h" } } diff --git a/public/_locales/pt_BR/messages.json b/public/_locales/pt_BR/messages.json index ffb57b21..27e274cd 100644 --- a/public/_locales/pt_BR/messages.json +++ b/public/_locales/pt_BR/messages.json @@ -837,5 +837,13 @@ }, "fillerNewFeature": { "message": "Novo! Pule tangentes e piadas com a categoria filler. Ative em opções" + }, + "dayAbbreviation": { + "message": "d", + "description": "100d" + }, + "hourAbbreviation": { + "message": "h", + "description": "100h" } } diff --git a/public/_locales/ru/messages.json b/public/_locales/ru/messages.json index 015e0d51..05b5a21d 100644 --- a/public/_locales/ru/messages.json +++ b/public/_locales/ru/messages.json @@ -837,5 +837,13 @@ }, "fillerNewFeature": { "message": "Новое! Пропускайте сегменты с отвлечёнными темами или шутками. Включите в настройках" + }, + "dayAbbreviation": { + "message": "д", + "description": "100d" + }, + "hourAbbreviation": { + "message": "ч", + "description": "100h" } } diff --git a/public/_locales/sk/messages.json b/public/_locales/sk/messages.json index a3d7e96a..4e4f0477 100644 --- a/public/_locales/sk/messages.json +++ b/public/_locales/sk/messages.json @@ -837,5 +837,13 @@ }, "fillerNewFeature": { "message": "Nové! Preskočte odbočky mimo tému a vtipy s kategóriou filler. Zapnite si ju v nastaveniach" + }, + "dayAbbreviation": { + "message": "d", + "description": "100d" + }, + "hourAbbreviation": { + "message": "h", + "description": "100h" } } diff --git a/public/_locales/sv/messages.json b/public/_locales/sv/messages.json index 1b2a6674..cc7b8eb4 100644 --- a/public/_locales/sv/messages.json +++ b/public/_locales/sv/messages.json @@ -837,5 +837,13 @@ }, "fillerNewFeature": { "message": "Nytt! Hoppa över ämnesavvikelser och skämt med utfyllnadskategorin. Aktiveras i alternativen" + }, + "dayAbbreviation": { + "message": "d", + "description": "100d" + }, + "hourAbbreviation": { + "message": "h", + "description": "100h" } } diff --git a/public/_locales/uk/messages.json b/public/_locales/uk/messages.json index 69d354da..77dcf68e 100644 --- a/public/_locales/uk/messages.json +++ b/public/_locales/uk/messages.json @@ -834,5 +834,13 @@ }, "SponsorTimeEditScrollNewFeature": { "message": "Навівши курсор на поле редагування, користуйтеся колесом прокрутки, щоб швидко відрегулювати час. Комбінації клавіш ctrl або shift можуть бути використані для точнішої настройки змін." + }, + "dayAbbreviation": { + "message": "д", + "description": "100d" + }, + "hourAbbreviation": { + "message": "г", + "description": "100h" } } diff --git a/public/_locales/vi/messages.json b/public/_locales/vi/messages.json index 7d0ec350..84ef665f 100644 --- a/public/_locales/vi/messages.json +++ b/public/_locales/vi/messages.json @@ -74,7 +74,7 @@ "message": "Video này có đoạn quảng cáo trong kho dữ liệu rồi!" }, "sponsor404": { - "message": "Không tìm thấy đoạn nào" + "message": "Không tìm thấy phân đoạn nào" }, "sponsorStart": { "message": "Đoạn quảng cáo bắt đầu vào lúc này" @@ -113,10 +113,10 @@ "message": "Đóng bảng popup" }, "SubmitTimes": { - "message": "Đăng phân đoạn" + "message": "Gửi phân đoạn" }, "submitCheck": { - "message": "Bạn có chắc là muốn đăng không?" + "message": "Bạn có chắc chắn muốn gửi không?" }, "whitelistChannel": { "message": "Đưa kênh vào danh sách không chặn" @@ -150,7 +150,7 @@ "message": "Xóa thời gian" }, "submitTimesButton": { - "message": "Đăng thời gian" + "message": "Gửi thời gian" }, "publicStats": { "message": "Tên này được dùng tại trang thông tin công khai để thể hiện lượng đóng góp của bạn. Xem" @@ -305,6 +305,13 @@ "skip_category": { "message": "Bỏ qua {0}?" }, + "mute_category": { + "message": "Ngắt tiếng {0} chứ?" + }, + "skip_to_category": { + "message": "Bỏ qua đến {0}?", + "description": "Used for skipping to things (Skip to Highlight)" + }, "skipped": { "message": "{0} đã bỏ qua", "description": "Example: Sponsor Skipped" @@ -313,6 +320,10 @@ "message": "{0} đã ngắt tiếng (Muted)", "description": "Example: Sponsor Muted" }, + "skipped_to_category": { + "message": "Đã bỏ qua đến {0}", + "description": "Used for skipping to things (Skipped to Highlight)" + }, "disableAutoSkip": { "message": "Tắt tự động bỏ qua" }, @@ -465,10 +476,10 @@ "message": "Tệp JSON này không được định dạng đúng cách. Tùy chọn của bạn chưa được thay đổi." }, "confirmNoticeTitle": { - "message": "Đăng phân đoạn" + "message": "Gửi phân đoạn" }, "submit": { - "message": "Đăng" + "message": "Gửi" }, "cancel": { "message": "Huỷ" @@ -552,6 +563,15 @@ "category_preview_description": { "message": "Tóm tắt nhanh về tập trước/tập sau trong 1 chuỗi video (series) dài (hoặc cũng có thể là tóm tắt trước về video sắp chiếu)." }, + "category_filler": { + "message": "Cảnh phụ" + }, + "category_filler_description": { + "message": "Tập hợp các cảnh không bắt buộc để xem trong video. Điều này không bao gồm các đoạn chứa nội dung hoặc nói về ngữ cảnh của video." + }, + "category_filler_short": { + "message": "Cảnh phụ" + }, "category_music_offtopic": { "message": "Nhạc: Phần không nhạc" }, @@ -649,7 +669,7 @@ "message": "(Kết thúc)" }, "hiddenDueToDownvote": { - "message": "đã bị ẩn: Không tán thành" + "message": "đã ẩn: hạ bình chọn" }, "hiddenDueToDuration": { "message": "đã bị ẩn: quá ngắn" @@ -686,7 +706,10 @@ "message": "Cân nhắc bật chế độ \"Bắt buộc kiểm tra kênh YouTube trước khi bỏ qua phân đoạn\"" }, "downvoteDescription": { - "message": "Phân đoạn sai / không đúng" + "message": "Chỉnh thời gian sai/không đúng" + }, + "incorrectCategory": { + "message": "Đổi danh mục" }, "nonMusicCategoryOnMusic": { "message": "Video này đã được phân loại là âm nhạc. Bạn có chắc đây là quảng cáo nhà tài trợ không? Nếu đây là phân đoạn \"Không phải nhạc\", hãy mở Cài đặt tiện ích và bật lựa chọn đó. Rồi bạn có thể đăng tải phân đoạn lên dưới danh mục \"Không phải nhạc\" thay vì \"Quảng cáo nhà tài trợ\". Hãy đọc Hướng dẫn nếu bạn vẫn còn vướng mắc" @@ -729,7 +752,7 @@ "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": "Donate" + "message": "Ủng hộ" }, "hideDonationLink": { "message": "Ẩn link donate" @@ -753,7 +776,7 @@ "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" + "message": "Đang 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." @@ -793,5 +816,34 @@ }, "LearnMore": { "message": "Tìm hiểu thêm" + }, + "CopyDownvoteButtonInfo": { + "message": "Hạ bình chọn và tạo một bản sao cục bộ cho bạn gửi lại" + }, + "OpenCategoryWikiPage": { + "message": "Mở trang wiki của danh mục này để tìm hiểu thêm." + }, + "CopyAndDownvote": { + "message": "Sao chép và hạ bình chọn" + }, + "ContinueVoting": { + "message": "Tiếp tục bỏ phiếu" + }, + "ChangeCategoryTooltip": { + "message": "Điều này sẽ ngay lập tức áp dụng cho phân đoạn của bạn" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Sử dụng con lăn chuột của bạn khi di chuột qua hộp chỉnh sửa để nhanh chóng điều chỉnh thời gian. Kết hợp phím ctrl hoặc shift có thể được sử dụng để tinh chỉnh các thay đổi." + }, + "fillerNewFeature": { + "message": "Mới! Bỏ qua các phân đoạn phụ và joke với danh mục \"Cảnh phụ\". Bật trong tùy chọn" + }, + "dayAbbreviation": { + "message": "d", + "description": "100d" + }, + "hourAbbreviation": { + "message": "h", + "description": "100h" } } diff --git a/public/_locales/zh_TW/messages.json b/public/_locales/zh_TW/messages.json index eff0b08c..b85477cc 100644 --- a/public/_locales/zh_TW/messages.json +++ b/public/_locales/zh_TW/messages.json @@ -281,6 +281,10 @@ "skip_category": { "message": "跳過 {0}?" }, + "muted": { + "message": "{0} 已靜音", + "description": "Example: Sponsor Muted" + }, "disableAutoSkip": { "message": "停用自動跳過" }, @@ -665,7 +669,16 @@ "hideForever": { "message": "永久隱藏" }, + "Submitting": { + "message": "正在提交" + }, + "Editing": { + "message": "編輯中" + }, "Credits": { "message": "致謝" + }, + "LearnMore": { + "message": "了解更多" } } From c3107ffcff63938a035ebe211f9de452b211f5ab Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 28 Dec 2021 15:25:20 -0500 Subject: [PATCH 13/44] bump version --- manifest/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest/manifest.json b/manifest/manifest.json index cdd23346..be6129f3 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "SponsorBlock", - "version": "3.6.2", + "version": "3.7", "default_locale": "en", "description": "__MSG_Description__", "homepage_url": "https://sponsor.ajay.app", From 5af483376311beedfc70c6548640a5ccdaaadde6 Mon Sep 17 00:00:00 2001 From: Michael C Date: Tue, 30 Nov 2021 02:58:57 -0500 Subject: [PATCH 14/44] change parser to use document if applicable --- src/content.ts | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/content.ts b/src/content.ts index 681ef10c..11ffba65 100644 --- a/src/content.ts +++ b/src/content.ts @@ -86,7 +86,7 @@ let controls: HTMLElement | null = null; const playerButtons: Record = {}; // Direct Links after the config is loaded -utils.wait(() => Config.config !== null, 1000, 1).then(() => videoIDChange(getYouTubeVideoID(document.URL))); +utils.wait(() => Config.config !== null, 1000, 1).then(() => videoIDChange(getYouTubeVideoID(document))); addHotkeyListener(); //the amount of times the sponsor lookup has retried @@ -137,7 +137,7 @@ function messageListener(request: Message, sender: unknown, sendResponse: (respo //messages from popup script switch(request.message){ case "update": - videoIDChange(getYouTubeVideoID(document.URL)); + videoIDChange(getYouTubeVideoID(document)); break; case "sponsorStart": startOrEndTimingNewSegment() @@ -509,7 +509,7 @@ function inMuteSegment(currentTime: number): boolean { * This makes sure the videoID is still correct and if the sponsorTime is included */ function incorrectVideoCheck(videoID?: string, sponsorTime?: SponsorTime): boolean { - const currentVideoID = getYouTubeVideoID(document.URL); + const currentVideoID = getYouTubeVideoID(document); if (currentVideoID !== (videoID || sponsorVideoID) || (sponsorTime && (!sponsorTimes || !sponsorTimes?.some((time) => time.segment === sponsorTime.segment)) && !sponsorTimesSubmitting.some((time) => time.segment === sponsorTime.segment))) { @@ -892,8 +892,23 @@ async function getVideoInfo(): Promise { } } -function getYouTubeVideoID(url: string): string | boolean { - // For YouTube TV support +function getYouTubeVideoID(document: Document): string | boolean { + const url = document.URL; + // skip to URL if matches youtube watch or invidious or matches youtube pattern + if ((!url.includes("youtube.com")) || url.includes("/watch") || url.includes("/embed/") || url.includes("/shorts/") || url.includes("playlist")) return getYouTubeVideoIDFromURL(url); + // skip to document if matches pattern + if (url.includes("/channel/") || url.includes("/user/") || url.includes("/c/")) return getYouTubeVideoIDFromDocument(document); + // not sure, try URL then document + return getYouTubeVideoIDFromURL(url) || getYouTubeVideoIDFromDocument(document); +} + +function getYouTubeVideoIDFromDocument(document: Document): string | boolean { + // get ID from document (channel trailer) + const videoURL = document.querySelector("[data-sessionlink='feature=player-title']")?.getAttribute("href"); + return getYouTubeVideoIDFromURL(videoURL); +} + +function getYouTubeVideoIDFromURL(url: string): string | boolean { if(url.startsWith("https://www.youtube.com/tv#/")) url = url.replace("#", ""); //Attempt to parse url @@ -913,7 +928,7 @@ function getYouTubeVideoID(url: string): string | boolean { } else if (!["m.youtube.com", "www.youtube.com", "www.youtube-nocookie.com", "music.youtube.com"].includes(urlObject.host)) { if (!Config.config) { // Call this later, in case this is an Invidious tab - utils.wait(() => Config.config !== null).then(() => videoIDChange(getYouTubeVideoID(url))); + utils.wait(() => Config.config !== null).then(() => videoIDChange(getYouTubeVideoIDFromURL(url))); } return false @@ -931,7 +946,7 @@ function getYouTubeVideoID(url: string): string | boolean { console.error("[SB] Video ID not valid for " + url); return false; } - } + } return false; } From 6930980a4df864754228be02b1008139857d5ca4 Mon Sep 17 00:00:00 2001 From: Michael C Date: Tue, 30 Nov 2021 19:13:08 -0500 Subject: [PATCH 15/44] set isInvidious to bypass UI bugs --- src/content.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index 11ffba65..019b3c8f 100644 --- a/src/content.ts +++ b/src/content.ts @@ -905,7 +905,12 @@ function getYouTubeVideoID(document: Document): string | boolean { function getYouTubeVideoIDFromDocument(document: Document): string | boolean { // get ID from document (channel trailer) const videoURL = document.querySelector("[data-sessionlink='feature=player-title']")?.getAttribute("href"); - return getYouTubeVideoIDFromURL(videoURL); + if (videoURL) { + onInvidious = true; + return getYouTubeVideoIDFromURL(videoURL); + } else { + return false + } } function getYouTubeVideoIDFromURL(url: string): string | boolean { From aca52abefc23c7c590843180cec3b9cf17f83b40 Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 28 Dec 2021 11:58:05 -0500 Subject: [PATCH 16/44] Make skip notice work on channel trailer --- src/utils.ts | 15 ++++++++++----- src/utils/pageUtils.ts | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index bdb441e7..c5299b40 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -2,6 +2,7 @@ import Config from "./config"; import { CategorySelection, SponsorTime, FetchResponse, BackgroundScriptContainer, Registration } from "./types"; import * as CompileConfig from "../config.json"; +import { findValidElement } from "./utils/pageUtils"; export default class Utils { @@ -436,11 +437,15 @@ export default class Utils { } findReferenceNode(): HTMLElement { - let referenceNode = document.getElementById("player-container-id") - ?? document.getElementById("movie_player") - ?? document.querySelector("#main-panel.ytmusic-player-page") // YouTube music - ?? document.querySelector("#player-container .video-js") // Invidious - ?? document.querySelector(".main-video-section > .video-container"); // Cloudtube + const selectors = [ + "#player-container-id", + "#movie_player", + "#c4-player", // Channel Trailer + "#main-panel.ytmusic-player-page", // YouTube music + "#player-container .video-js", // Invidious + ".main-video-section > .video-container" // Cloudtube + ] + let referenceNode = findValidElement(selectors) if (referenceNode == null) { //for embeds const player = document.getElementById("player"); diff --git a/src/utils/pageUtils.ts b/src/utils/pageUtils.ts index e88f7cc9..d94b36d5 100644 --- a/src/utils/pageUtils.ts +++ b/src/utils/pageUtils.ts @@ -17,4 +17,19 @@ export function getControls(): HTMLElement | false { } return false; +} + +export function isVisible(element: HTMLElement): boolean { + return element.offsetWidth > 0 && element.offsetHeight > 0; +} + +export function findValidElement(selectors: string[]): HTMLElement { + for (const selector of selectors) { + const element = document.querySelector(selector) as HTMLElement; + if (element && isVisible(element)) { + return element; + } + } + + return null; } \ No newline at end of file From 7f374f0f860d898f3ceddc7134c21eb7f35fd156 Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 28 Dec 2021 12:17:08 -0500 Subject: [PATCH 17/44] Trigger changes even if videoid doesn't change if video element changes --- src/content.ts | 10 +++++----- src/utils.ts | 4 ++-- src/utils/pageUtils.ts | 16 ++++++++++++---- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/content.ts b/src/content.ts index 019b3c8f..c8dd4ac6 100644 --- a/src/content.ts +++ b/src/content.ts @@ -17,7 +17,7 @@ import { getCategoryActionType } from "./utils/categoryUtils"; import { SkipButtonControlBar } from "./js-components/skipButtonControlBar"; import { Tooltip } from "./render/Tooltip"; import { getStartTimeFromUrl } from "./utils/urlParser"; -import { getControls } from "./utils/pageUtils"; +import { findValidElement, getControls, isVisible } from "./utils/pageUtils"; // Hack to get the CSS loaded on permission-based sites (Invidious) utils.wait(() => Config.config !== null, 5000, 10).then(addCSS); @@ -266,8 +266,8 @@ function resetValues() { } async function videoIDChange(id) { - //if the id has not changed return - if (sponsorVideoID === id) return; + //if the id has not changed return unless the video element has changed + if (sponsorVideoID === id && isVisible(video)) return; //set the global videoID sponsorVideoID = id; @@ -540,7 +540,7 @@ function setupVideoMutationListener() { } function refreshVideoAttachments() { - const newVideo = document.querySelector('video'); + const newVideo = findValidElement(document.querySelectorAll('video')) as HTMLVideoElement; if (newVideo && newVideo !== video) { video = newVideo; @@ -638,7 +638,7 @@ function setupSkipButtonControlBar() { } async function sponsorsLookup(id: string, keepOldSubmissions = true) { - if (!video) refreshVideoAttachments(); + if (!video || !isVisible(video)) refreshVideoAttachments(); //there is still no video here if (!video) { setTimeout(() => sponsorsLookup(id), 100); diff --git a/src/utils.ts b/src/utils.ts index c5299b40..81be9488 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -2,7 +2,7 @@ import Config from "./config"; import { CategorySelection, SponsorTime, FetchResponse, BackgroundScriptContainer, Registration } from "./types"; import * as CompileConfig from "../config.json"; -import { findValidElement } from "./utils/pageUtils"; +import { findValidElementFromSelector } from "./utils/pageUtils"; export default class Utils { @@ -445,7 +445,7 @@ export default class Utils { "#player-container .video-js", // Invidious ".main-video-section > .video-container" // Cloudtube ] - let referenceNode = findValidElement(selectors) + let referenceNode = findValidElementFromSelector(selectors) if (referenceNode == null) { //for embeds const player = document.getElementById("player"); diff --git a/src/utils/pageUtils.ts b/src/utils/pageUtils.ts index d94b36d5..d31ead47 100644 --- a/src/utils/pageUtils.ts +++ b/src/utils/pageUtils.ts @@ -20,12 +20,20 @@ export function getControls(): HTMLElement | false { } export function isVisible(element: HTMLElement): boolean { - return element.offsetWidth > 0 && element.offsetHeight > 0; + return element && element.offsetWidth > 0 && element.offsetHeight > 0; } -export function findValidElement(selectors: string[]): HTMLElement { - for (const selector of selectors) { - const element = document.querySelector(selector) as HTMLElement; +export function findValidElementFromSelector(selectors: string[]): HTMLElement { + return findValidElementFromGenerator(selectors, (selector) => document.querySelector(selector)); +} + +export function findValidElement(elements: HTMLElement[] | NodeListOf): HTMLElement { + return findValidElementFromGenerator(elements); +} + +function findValidElementFromGenerator(objects: T[] | NodeListOf, generator?: (obj: T) => HTMLElement): HTMLElement { + for (const obj of objects) { + const element = generator ? generator(obj as T) : obj as HTMLElement; if (element && isVisible(element)) { return element; } From 9b152a552505b561f4a68ad33e431c0b2c2d1ab8 Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 28 Dec 2021 12:52:48 -0500 Subject: [PATCH 18/44] Fix preview bar not being recreated --- src/content.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index c8dd4ac6..881765e7 100644 --- a/src/content.ts +++ b/src/content.ts @@ -87,6 +87,7 @@ const playerButtons: Record Config.config !== null, 1000, 1).then(() => videoIDChange(getYouTubeVideoID(document))); +addPageListeners(); addHotkeyListener(); //the amount of times the sponsor lookup has retried @@ -377,7 +378,7 @@ function createPreviewBar(): void { ]; for (const selector of progressElementSelectors) { - const el = document.querySelector(selector); + const el = findValidElement(document.querySelectorAll(selector)); if (el) { previewBar = new PreviewBar(el, onMobileYouTube, onInvidious); @@ -550,6 +551,14 @@ function refreshVideoAttachments() { setupVideoListeners(); setupSkipButtonControlBar(); } + + // Create a new bar in the new video element + if (previewBar && !utils.findReferenceNode()?.contains(previewBar.container)) { + previewBar.remove(); + previewBar = null; + + createPreviewBar(); + } } } @@ -1843,6 +1852,16 @@ function getSegmentsMessage(sponsorTimes: SponsorTime[]): string { return sponsorTimesMessage; } +function addPageListeners(): void { + const refreshListners = () => { + if (!isVisible(video)) { + refreshVideoAttachments(); + } + }; + + document.addEventListener("yt-navigate-finish", refreshListners); +} + function addHotkeyListener(): void { document.addEventListener("keydown", hotkeyListener); } From 2db19711900e0a87ee8cb97df2d8645375a24413 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 29 Dec 2021 00:30:24 -0500 Subject: [PATCH 19/44] Don't change countdown speed with playback speed Fix #1067 --- src/components/NoticeComponent.tsx | 12 +----------- src/components/SkipNoticeComponent.tsx | 1 - 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/components/NoticeComponent.tsx b/src/components/NoticeComponent.tsx index d7307bca..c3128e72 100644 --- a/src/components/NoticeComponent.tsx +++ b/src/components/NoticeComponent.tsx @@ -16,8 +16,6 @@ export interface NoticeProps { timed?: boolean, idSuffix?: string, - videoSpeed?: () => number, - fadeIn?: boolean, startFaded?: boolean, firstColumn?: React.ReactElement, @@ -51,7 +49,6 @@ export interface NoticeState { class NoticeComponent extends React.Component { countdownInterval: NodeJS.Timeout; - intervalVideoSpeed: number; idSuffix: string; @@ -259,10 +256,6 @@ class NoticeComponent extends React.Component { const countdownTime = Math.min(this.state.countdownTime - 1, this.state.maxCountdownTime()); - if (this.props.videoSpeed && this.intervalVideoSpeed != this.props.videoSpeed()) { - this.setupInterval(); - } - if (countdownTime <= 0) { //remove this from setInterval clearInterval(this.countdownInterval); @@ -325,10 +318,7 @@ class NoticeComponent extends React.Component { setupInterval(): void { if (this.countdownInterval) clearInterval(this.countdownInterval); - const intervalDuration = this.props.videoSpeed ? 1000 / this.props.videoSpeed() : 1000; - this.countdownInterval = setInterval(this.countdown.bind(this), intervalDuration); - - if (this.props.videoSpeed) this.intervalVideoSpeed = this.props.videoSpeed(); + this.countdownInterval = setInterval(this.countdown.bind(this), 1000); } resetCountdown(): void { diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 002218b6..da771853 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -177,7 +177,6 @@ class SkipNoticeComponent extends React.Component= NoticeVisbilityMode.FadedForAutoSkip && this.autoSkip)} timed={true} maxCountdownTime={this.state.maxCountdownTime} - videoSpeed={() => this.contentContainer().v?.playbackRate} style={noticeStyle} biggerCloseButton={this.contentContainer().onMobileYouTube} ref={this.noticeRef} From 12bc10ea1f48d9ecdf34cbb6f50b49b209ca247c Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 29 Dec 2021 00:35:33 -0500 Subject: [PATCH 20/44] Make youtube settings in front of skip notice --- public/content.css | 5 +++++ src/components/SubmissionNoticeComponent.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/public/content.css b/public/content.css index bcc755ea..b9f19080 100644 --- a/public/content.css +++ b/public/content.css @@ -26,6 +26,11 @@ height: 100%; } +/* Make sure settings are upfront */ +.ytp-settings-menu { + z-index: 6000 !important; +} + /* Preview Bar page hacks */ .ytp-tooltip:not(.sponsorCategoryTooltipVisible) .sponsorCategoryTooltip { diff --git a/src/components/SubmissionNoticeComponent.tsx b/src/components/SubmissionNoticeComponent.tsx index 5b5bd005..82aa0cca 100644 --- a/src/components/SubmissionNoticeComponent.tsx +++ b/src/components/SubmissionNoticeComponent.tsx @@ -73,7 +73,7 @@ class SubmissionNoticeComponent extends React.Component + zIndex={5000}> {/* Text Boxes */} {this.getMessageBoxes()} From 07e3117e22215ec0c2e7fd1541aed8f32f6a5871 Mon Sep 17 00:00:00 2001 From: CyberPhoenix90 Date: Thu, 30 Dec 2021 15:05:09 +0100 Subject: [PATCH 21/44] fix leak that was killing performance over long periods --- src/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index bdb441e7..3aee2b6f 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -26,7 +26,10 @@ export default class Utils { /** Function that can be used to wait for a condition before returning. */ async wait(condition: () => T | false, timeout = 5000, check = 100): Promise { return await new Promise((resolve, reject) => { - setTimeout(() => reject("TIMEOUT"), timeout); + setTimeout(() => { + clearInterval(interval); + reject("TIMEOUT") + }, timeout); const intervalCheck = () => { const result = condition(); From 8763d173bda7b68dbadbcf57bf29e3053f00ec13 Mon Sep 17 00:00:00 2001 From: CyberPhoenix90 Date: Thu, 30 Dec 2021 15:22:02 +0100 Subject: [PATCH 22/44] fix missing semi colon --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 3aee2b6f..661ca0bb 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -28,7 +28,7 @@ export default class Utils { return await new Promise((resolve, reject) => { setTimeout(() => { clearInterval(interval); - reject("TIMEOUT") + reject("TIMEOUT"); }, timeout); const intervalCheck = () => { From b758cbb25f5a2c7c45a54d9f579d9ccb6e8e799f Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Thu, 30 Dec 2021 17:20:11 -0500 Subject: [PATCH 23/44] bump version --- manifest/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest/manifest.json b/manifest/manifest.json index be6129f3..fcb22641 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "SponsorBlock", - "version": "3.7", + "version": "3.7.1", "default_locale": "en", "description": "__MSG_Description__", "homepage_url": "https://sponsor.ajay.app", From 0336157673855d86e0c7e4a830d638db4c092ee8 Mon Sep 17 00:00:00 2001 From: Brian Choromanski Date: Fri, 31 Dec 2021 16:34:29 -0500 Subject: [PATCH 24/44] Fixed minute to day conversion --- src/popup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/popup.ts b/src/popup.ts index 84607e15..14d22dd8 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -739,7 +739,7 @@ async function runThePopup(messageListener?: MessageListener): Promise { */ function getFormattedHours(minutes) { minutes = Math.round(minutes * 10) / 10; - const days = Math.floor(minutes / 3600); + const days = Math.floor(minutes / 1440); const hours = Math.floor(minutes / 60) % 24; return (days > 0 ? days + chrome.i18n.getMessage("dayAbbreviation") + " " : "") + (hours > 0 ? hours + chrome.i18n.getMessage("hourAbbreviation") + " " : "") + (minutes % 60).toFixed(1); } From 7a7b21cd873479e4e9f1129287269b3e5a23f9c5 Mon Sep 17 00:00:00 2001 From: Michael C Date: Fri, 31 Dec 2021 18:17:15 -0500 Subject: [PATCH 25/44] add path for embedded videos and playlists --- src/content.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content.ts b/src/content.ts index 881765e7..0730d59a 100644 --- a/src/content.ts +++ b/src/content.ts @@ -904,15 +904,15 @@ async function getVideoInfo(): Promise { function getYouTubeVideoID(document: Document): string | boolean { const url = document.URL; // skip to URL if matches youtube watch or invidious or matches youtube pattern - if ((!url.includes("youtube.com")) || url.includes("/watch") || url.includes("/embed/") || url.includes("/shorts/") || url.includes("playlist")) return getYouTubeVideoIDFromURL(url); + if ((!url.includes("youtube.com")) || url.includes("/watch") || url.includes("/shorts/") || url.includes("playlist")) return getYouTubeVideoIDFromURL(url); // skip to document if matches pattern - if (url.includes("/channel/") || url.includes("/user/") || url.includes("/c/")) return getYouTubeVideoIDFromDocument(document); + if (url.includes("/channel/") || url.includes("/user/") || url.includes("/c/") || url.includes("/embed/")) return getYouTubeVideoIDFromDocument(document); // not sure, try URL then document return getYouTubeVideoIDFromURL(url) || getYouTubeVideoIDFromDocument(document); } function getYouTubeVideoIDFromDocument(document: Document): string | boolean { - // get ID from document (channel trailer) + // get ID from document (channel trailer / embedded playlist) const videoURL = document.querySelector("[data-sessionlink='feature=player-title']")?.getAttribute("href"); if (videoURL) { onInvidious = true; From 44bc8741ef1e85fd38da5f56a77512ed4243c660 Mon Sep 17 00:00:00 2001 From: Michael C Date: Fri, 31 Dec 2021 22:56:46 -0500 Subject: [PATCH 26/44] fix UI issues with embeds - add loadStart trigger to create & update preview and buttons - show info button on /embed/ but not /channel/ --- src/content.ts | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/content.ts b/src/content.ts index 0730d59a..b72979ff 100644 --- a/src/content.ts +++ b/src/content.ts @@ -399,6 +399,16 @@ function durationChangeListener(): void { updatePreviewBar(); } +/** + * Triggered once the video is ready. + * This is mainly to attach to embedded players who don't have a video element visible. + */ +function videoOnReadyListener(): void { + createPreviewBar(); + updatePreviewBar(); + createButtons(); +} + function cancelSponsorSchedule(): void { if (currentSkipSchedule !== null) { clearTimeout(currentSkipSchedule); @@ -564,6 +574,7 @@ function refreshVideoAttachments() { function setupVideoListeners() { //wait until it is loaded + video.addEventListener('loadstart', videoOnReadyListener) video.addEventListener('durationchange', durationChangeListener); if (!Config.config.disableSkipping) { @@ -905,17 +916,19 @@ function getYouTubeVideoID(document: Document): string | boolean { const url = document.URL; // skip to URL if matches youtube watch or invidious or matches youtube pattern if ((!url.includes("youtube.com")) || url.includes("/watch") || url.includes("/shorts/") || url.includes("playlist")) return getYouTubeVideoIDFromURL(url); + // skip to document and don't hide if on /embed/ + if (url.includes("/embed/")) return getYouTubeVideoIDFromDocument(document, false); // skip to document if matches pattern - if (url.includes("/channel/") || url.includes("/user/") || url.includes("/c/") || url.includes("/embed/")) return getYouTubeVideoIDFromDocument(document); + if (url.includes("/channel/") || url.includes("/user/") || url.includes("/c/")) return getYouTubeVideoIDFromDocument(document); // not sure, try URL then document return getYouTubeVideoIDFromURL(url) || getYouTubeVideoIDFromDocument(document); } -function getYouTubeVideoIDFromDocument(document: Document): string | boolean { +function getYouTubeVideoIDFromDocument(document: Document, hideIcon = true): string | boolean { // get ID from document (channel trailer / embedded playlist) const videoURL = document.querySelector("[data-sessionlink='feature=player-title']")?.getAttribute("href"); if (videoURL) { - onInvidious = true; + onInvidious = hideIcon; return getYouTubeVideoIDFromURL(videoURL); } else { return false From 6ed946c99829079dd5f5978bf37710453f8a4b9d Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 1 Jan 2022 14:41:07 -0500 Subject: [PATCH 27/44] bump version --- manifest/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest/manifest.json b/manifest/manifest.json index fcb22641..181118c6 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "SponsorBlock", - "version": "3.7.1", + "version": "3.7.2", "default_locale": "en", "description": "__MSG_Description__", "homepage_url": "https://sponsor.ajay.app", From d36b4a54f3154fdcfbd2e5f059c401bdd6ceeee3 Mon Sep 17 00:00:00 2001 From: Ajay Date: Sun, 2 Jan 2022 23:35:24 -0500 Subject: [PATCH 28/44] Allow submitting as full video --- config.json.example | 4 ++-- public/_locales/en/messages.json | 4 ++++ src/components/SponsorTimeEditComponent.tsx | 12 +++++++++++- src/types.ts | 3 ++- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/config.json.example b/config.json.example index 7ff22bb7..0a587e3c 100644 --- a/config.json.example +++ b/config.json.example @@ -4,8 +4,8 @@ "serverAddressComment": "This specifies the default SponsorBlock server to connect to", "categoryList": ["sponsor", "selfpromo", "interaction", "poi_highlight", "intro", "outro", "preview", "filler", "music_offtopic"], "categorySupport": { - "sponsor": ["skip", "mute"], - "selfpromo": ["skip", "mute"], + "sponsor": ["skip", "mute", "full"], + "selfpromo": ["skip", "mute", "full"], "interaction": ["skip", "mute"], "intro": ["skip", "mute"], "outro": ["skip", "mute"], diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index c56b3275..c862ba00 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -302,6 +302,10 @@ "mute": { "message": "Mute" }, + "full": { + "message": "Full Video", + "description": "Used for the name of the option to label an entire video as sponsor or self promotion." + }, "skip_category": { "message": "Skip {0}?" }, diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index 144f3c82..1a734cb5 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import * as CompileConfig from "../../config.json"; import Config from "../config"; -import { ActionType, ActionTypes, Category, CategoryActionType, ContentContainer, SponsorTime } from "../types"; +import { ActionType, Category, CategoryActionType, ContentContainer, SponsorTime } from "../types"; import Utils from "../utils"; import { getCategoryActionType } from "../utils/categoryUtils"; import SubmissionNoticeComponent from "./SubmissionNoticeComponent"; @@ -100,11 +100,14 @@ class SponsorTimeEditComponent extends React.Component {utils.getFormattedTime(segment[0], true) + @@ -444,6 +448,12 @@ class SponsorTimeEditComponent extends React.Component Date: Wed, 5 Jan 2022 02:35:58 -0500 Subject: [PATCH 29/44] Add pill beside title for full video reports --- public/content.css | 12 ++++ src/components/CategoryPillComponent.tsx | 47 ++++++++++++++++ src/content.ts | 22 +++++++- src/render/CategoryPill.tsx | 71 ++++++++++++++++++++++++ src/utils.ts | 22 +------- src/utils/genericUtils.ts | 26 +++++++++ 6 files changed, 178 insertions(+), 22 deletions(-) create mode 100644 src/components/CategoryPillComponent.tsx create mode 100644 src/render/CategoryPill.tsx create mode 100644 src/utils/genericUtils.ts diff --git a/public/content.css b/public/content.css index b9f19080..98a6b4f2 100644 --- a/public/content.css +++ b/public/content.css @@ -613,3 +613,15 @@ input::-webkit-inner-spin-button { line-height: 1.5em; } +.sponsorBlockCategoryPill { + border-radius: 25px; + padding-left: 8px; + padding-right: 8px; + margin-right: 3px; + color: white; +} + +.sponsorBlockCategoryPillTitleSection { + display: flex; + align-items: center; +} \ No newline at end of file diff --git a/src/components/CategoryPillComponent.tsx b/src/components/CategoryPillComponent.tsx new file mode 100644 index 00000000..0f20c82f --- /dev/null +++ b/src/components/CategoryPillComponent.tsx @@ -0,0 +1,47 @@ +import * as React from "react"; +import Config from "../config"; +import { SponsorTime } from "../types"; + +export interface CategoryPillProps { + +} + +export interface CategoryPillState { + segment?: SponsorTime; + show: boolean; +} + +class CategoryPillComponent extends React.Component { + + constructor(props: CategoryPillProps) { + super(props); + + this.state = { + segment: null, + show: false + }; + } + + render(): React.ReactElement { + const style: React.CSSProperties = { + backgroundColor: Config.config.barTypes["preview-" + this.state.segment?.category]?.color, + display: this.state.show ? "flex" : "none" + } + + return ( + + + + + + {chrome.i18n.getMessage("category_" + this.state.segment?.category)} + + + + ); + } +} + +export default CategoryPillComponent; diff --git a/src/content.ts b/src/content.ts index 681ef10c..f3d589cc 100644 --- a/src/content.ts +++ b/src/content.ts @@ -18,6 +18,7 @@ import { SkipButtonControlBar } from "./js-components/skipButtonControlBar"; import { Tooltip } from "./render/Tooltip"; import { getStartTimeFromUrl } from "./utils/urlParser"; import { getControls } from "./utils/pageUtils"; +import { CategoryPill } from "./render/CategoryPill"; // Hack to get the CSS loaded on permission-based sites (Invidious) utils.wait(() => Config.config !== null, 5000, 10).then(addCSS); @@ -75,9 +76,11 @@ let lastCheckVideoTime = -1; //is this channel whitelised from getting sponsors skipped let channelWhitelisted = false; -// create preview bar let previewBar: PreviewBar = null; +// Skip to highlight button let skipButtonControlBar: SkipButtonControlBar = null; +// For full video sponsors/selfpromo +let categoryPill: CategoryPill = null; /** Element containing the player controls on the YouTube player. */ let controls: HTMLElement | null = null; @@ -263,6 +266,7 @@ function resetValues() { } skipButtonControlBar?.disable(); + categoryPill?.setVisibility(false); } async function videoIDChange(id) { @@ -549,6 +553,7 @@ function refreshVideoAttachments() { setupVideoListeners(); setupSkipButtonControlBar(); + setupCategoryPill(); } } } @@ -637,6 +642,14 @@ function setupSkipButtonControlBar() { skipButtonControlBar.attachToPage(); } +function setupCategoryPill() { + if (!categoryPill) { + categoryPill = new CategoryPill(); + } + + categoryPill.attachToPage(); +} + async function sponsorsLookup(id: string, keepOldSubmissions = true) { if (!video) refreshVideoAttachments(); //there is still no video here @@ -672,7 +685,7 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) { const hashPrefix = (await utils.getHash(id, 1)).substr(0, 4); const response = await utils.asyncRequestToServer('GET', "/api/skipSegments/" + hashPrefix, { categories, - actionTypes: Config.config.muteSegments ? [ActionType.Skip, ActionType.Mute] : [ActionType.Skip], + actionTypes: Config.config.muteSegments ? [ActionType.Skip, ActionType.Mute, ActionType.Full] : [ActionType.Skip, ActionType.Full], userAgent: `${chrome.runtime.id}`, ...extraRequestData }); @@ -864,6 +877,11 @@ function startSkipScheduleCheckingForStartSponsors() { } } + const fullVideoSegment = sponsorTimes.filter((time) => time.actionType === ActionType.Full)[0]; + if (fullVideoSegment) { + categoryPill?.setSegment(fullVideoSegment); + } + if (startingSegmentTime !== -1) { startSponsorSchedule(undefined, startingSegmentTime); } else { diff --git a/src/render/CategoryPill.tsx b/src/render/CategoryPill.tsx new file mode 100644 index 00000000..6c6695e2 --- /dev/null +++ b/src/render/CategoryPill.tsx @@ -0,0 +1,71 @@ +import * as React from "react"; +import * as ReactDOM from "react-dom"; +import CategoryPillComponent, { CategoryPillState } from "../components/CategoryPillComponent"; +import { SponsorTime } from "../types"; +import { GenericUtils } from "../utils/genericUtils"; + +export class CategoryPill { + container: HTMLElement; + ref: React.RefObject; + + unsavedState: CategoryPillState; + + constructor() { + this.ref = React.createRef(); + } + + async attachToPage(): Promise { + // TODO: Mobile and invidious + const referenceNode = await GenericUtils.wait(() => document.querySelector(".ytd-video-primary-info-renderer.title") as HTMLElement); + + if (referenceNode && !referenceNode.contains(this.container)) { + this.container = document.createElement('span'); + this.container.id = "categoryPill"; + this.container.style.display = "relative"; + + referenceNode.prepend(this.container); + referenceNode.style.display = "flex"; + + ReactDOM.render( + , + this.container + ); + + if (this.unsavedState) { + this.ref.current?.setState(this.unsavedState); + this.unsavedState = null; + } + } + } + + close(): void { + ReactDOM.unmountComponentAtNode(this.container); + this.container.remove(); + } + + setVisibility(show: boolean): void { + const newState = { + show + }; + + if (this.ref.current) { + this.ref.current?.setState(newState); + } else { + this.unsavedState = newState; + } + } + + setSegment(segment: SponsorTime): void { + const newState = { + segment, + show: true + }; + + if (this.ref.current) { + this.ref.current?.setState(newState); + } else { + this.unsavedState = newState; + } + + } +} \ No newline at end of file diff --git a/src/utils.ts b/src/utils.ts index 661ca0bb..7cffa45a 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -2,6 +2,7 @@ import Config from "./config"; import { CategorySelection, SponsorTime, FetchResponse, BackgroundScriptContainer, Registration } from "./types"; import * as CompileConfig from "../config.json"; +import { GenericUtils } from "./utils/genericUtils"; export default class Utils { @@ -23,27 +24,8 @@ export default class Utils { this.backgroundScriptContainer = backgroundScriptContainer; } - /** Function that can be used to wait for a condition before returning. */ async wait(condition: () => T | false, timeout = 5000, check = 100): Promise { - return await new Promise((resolve, reject) => { - setTimeout(() => { - clearInterval(interval); - reject("TIMEOUT"); - }, timeout); - - const intervalCheck = () => { - const result = condition(); - if (result !== false) { - resolve(result); - clearInterval(interval); - } - }; - - const interval = setInterval(intervalCheck, check); - - //run the check once first, this speeds it up a lot - intervalCheck(); - }); + return GenericUtils.wait(condition, timeout, check); } containsPermission(permissions: chrome.permissions.Permissions): Promise { diff --git a/src/utils/genericUtils.ts b/src/utils/genericUtils.ts new file mode 100644 index 00000000..32cf83f5 --- /dev/null +++ b/src/utils/genericUtils.ts @@ -0,0 +1,26 @@ +/** Function that can be used to wait for a condition before returning. */ +async function wait(condition: () => T | false, timeout = 5000, check = 100): Promise { + return await new Promise((resolve, reject) => { + setTimeout(() => { + clearInterval(interval); + reject("TIMEOUT"); + }, timeout); + + const intervalCheck = () => { + const result = condition(); + if (result) { + resolve(result); + clearInterval(interval); + } + }; + + const interval = setInterval(intervalCheck, check); + + //run the check once first, this speeds it up a lot + intervalCheck(); + }); +} + +export const GenericUtils = { + wait +} \ No newline at end of file From 388b9179ac788812546c5021f367ede55d4917fa Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 5 Jan 2022 02:39:13 -0500 Subject: [PATCH 30/44] Don't show full segments on preview bar --- src/content.ts | 4 +++- src/js-components/previewBar.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index f3d589cc..93e3fb8c 100644 --- a/src/content.ts +++ b/src/content.ts @@ -981,6 +981,7 @@ function updatePreviewBar(): void { segment: segment.segment as [number, number], category: segment.category, unsubmitted: false, + actionType: segment.actionType, showLarger: getCategoryActionType(segment.category) === CategoryActionType.POI }); }); @@ -991,11 +992,12 @@ function updatePreviewBar(): void { segment: segment.segment as [number, number], category: segment.category, unsubmitted: true, + actionType: segment.actionType, showLarger: getCategoryActionType(segment.category) === CategoryActionType.POI }); }); - previewBar.set(previewBarSegments, video?.duration) + previewBar.set(previewBarSegments.filter((segment) => segment.actionType !== ActionType.Full), video?.duration) if (Config.config.showTimeWithSkips) { const skippedDuration = utils.getTimestampsDuration(previewBarSegments.map(({segment}) => segment)); diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index 4e840646..d4d041a9 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -6,6 +6,7 @@ https://github.com/videosegments/videosegments/commits/f1e111bdfe231947800c6efdd 'use strict'; import Config from "../config"; +import { ActionType } from "../types"; import Utils from "../utils"; const utils = new Utils(); @@ -15,6 +16,7 @@ export interface PreviewBarSegment { segment: [number, number]; category: string; unsubmitted: boolean; + actionType: ActionType; showLarger: boolean; } From 040bce263855a1ff68cecb694f8da903e3df55ec Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 5 Jan 2022 15:13:42 -0500 Subject: [PATCH 31/44] Make category pill work on invidious and mobile youtube --- src/content.ts | 2 +- src/render/CategoryPill.tsx | 29 +++++++++++++++++++++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/content.ts b/src/content.ts index 93e3fb8c..23d3b9d3 100644 --- a/src/content.ts +++ b/src/content.ts @@ -647,7 +647,7 @@ function setupCategoryPill() { categoryPill = new CategoryPill(); } - categoryPill.attachToPage(); + categoryPill.attachToPage(onMobileYouTube); } async function sponsorsLookup(id: string, keepOldSubmissions = true) { diff --git a/src/render/CategoryPill.tsx b/src/render/CategoryPill.tsx index 6c6695e2..4fe846d0 100644 --- a/src/render/CategoryPill.tsx +++ b/src/render/CategoryPill.tsx @@ -9,15 +9,19 @@ export class CategoryPill { ref: React.RefObject; unsavedState: CategoryPillState; + + mutationObserver?: MutationObserver; constructor() { this.ref = React.createRef(); } - async attachToPage(): Promise { - // TODO: Mobile and invidious - const referenceNode = await GenericUtils.wait(() => document.querySelector(".ytd-video-primary-info-renderer.title") as HTMLElement); - + async attachToPage(onMobileYouTube: boolean): Promise { + const referenceNode = + await GenericUtils.wait(() => + // YouTube, Mobile YouTube, Invidious + document.querySelector(".ytd-video-primary-info-renderer.title, .slim-video-information-title, #player-container + .h-box > h1") as HTMLElement); + if (referenceNode && !referenceNode.contains(this.container)) { this.container = document.createElement('span'); this.container.id = "categoryPill"; @@ -26,6 +30,10 @@ export class CategoryPill { referenceNode.prepend(this.container); referenceNode.style.display = "flex"; + if (this.ref.current) { + this.unsavedState = this.ref.current.state; + } + ReactDOM.render( , this.container @@ -35,6 +43,19 @@ export class CategoryPill { this.ref.current?.setState(this.unsavedState); this.unsavedState = null; } + + if (onMobileYouTube) { + if (this.mutationObserver) { + this.mutationObserver.disconnect(); + } + + this.mutationObserver = new MutationObserver(() => this.attachToPage(onMobileYouTube)); + + this.mutationObserver.observe(referenceNode, { + childList: true, + subtree: true + }); + } } } From d23e434209faf6c3ff502422b679c7a0fc98aa53 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 5 Jan 2022 15:16:29 -0500 Subject: [PATCH 32/44] Show full video on popup --- src/popup.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/popup.ts b/src/popup.ts index 14d22dd8..8b5366f3 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -1,7 +1,7 @@ import Config from "./config"; import Utils from "./utils"; -import { SponsorTime, SponsorHideType, CategoryActionType } from "./types"; +import { SponsorTime, SponsorHideType, CategoryActionType, ActionType } from "./types"; import { Message, MessageResponse, IsInfoFoundMessageResponse } from "./messageTypes"; import { showDonationLink } from "./utils/configUtils"; import { getCategoryActionType } from "./utils/categoryUtils"; @@ -405,10 +405,15 @@ async function runThePopup(messageListener?: MessageListener): Promise { const textNode = document.createTextNode(utils.shortCategoryName(segmentTimes[i].category) + extraInfo); const segmentTimeFromToNode = document.createElement("div"); - segmentTimeFromToNode.innerText = utils.getFormattedTime(segmentTimes[i].segment[0], true) + + if (segmentTimes[i].actionType === ActionType.Full) { + segmentTimeFromToNode.innerText = chrome.i18n.getMessage("full"); + } else { + segmentTimeFromToNode.innerText = utils.getFormattedTime(segmentTimes[i].segment[0], true) + (getCategoryActionType(segmentTimes[i].category) !== CategoryActionType.POI ? " " + chrome.i18n.getMessage("to") + " " + utils.getFormattedTime(segmentTimes[i].segment[1], true) : ""); + } + segmentTimeFromToNode.style.margin = "5px"; sponsorTimeButton.appendChild(categoryColorCircle); From a6a9b7dd8c7a88654909c0ee6a3218738d343504 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 5 Jan 2022 17:26:05 -0500 Subject: [PATCH 33/44] Decrease font size of pill --- public/content.css | 3 +++ src/components/CategoryPillComponent.tsx | 6 ++++-- src/content.ts | 2 +- src/render/CategoryPill.tsx | 7 ++++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/public/content.css b/public/content.css index 98a6b4f2..aabc6790 100644 --- a/public/content.css +++ b/public/content.css @@ -619,6 +619,9 @@ input::-webkit-inner-spin-button { padding-right: 8px; margin-right: 3px; color: white; + cursor: pointer; + font-size: 75%; + height: 100%; } .sponsorBlockCategoryPillTitleSection { diff --git a/src/components/CategoryPillComponent.tsx b/src/components/CategoryPillComponent.tsx index 0f20c82f..1ec12695 100644 --- a/src/components/CategoryPillComponent.tsx +++ b/src/components/CategoryPillComponent.tsx @@ -9,6 +9,7 @@ export interface CategoryPillProps { export interface CategoryPillState { segment?: SponsorTime; show: boolean; + open?: boolean; } class CategoryPillComponent extends React.Component { @@ -18,7 +19,8 @@ class CategoryPillComponent extends React.Component + className={"sponsorBlockCategoryPill"} > diff --git a/src/content.ts b/src/content.ts index 23d3b9d3..f9e3172a 100644 --- a/src/content.ts +++ b/src/content.ts @@ -647,7 +647,7 @@ function setupCategoryPill() { categoryPill = new CategoryPill(); } - categoryPill.attachToPage(onMobileYouTube); + categoryPill.attachToPage(onMobileYouTube, onInvidious); } async function sponsorsLookup(id: string, keepOldSubmissions = true) { diff --git a/src/render/CategoryPill.tsx b/src/render/CategoryPill.tsx index 4fe846d0..4681a813 100644 --- a/src/render/CategoryPill.tsx +++ b/src/render/CategoryPill.tsx @@ -16,7 +16,7 @@ export class CategoryPill { this.ref = React.createRef(); } - async attachToPage(onMobileYouTube: boolean): Promise { + async attachToPage(onMobileYouTube: boolean, onInvidious: boolean): Promise { const referenceNode = await GenericUtils.wait(() => // YouTube, Mobile YouTube, Invidious @@ -49,7 +49,7 @@ export class CategoryPill { this.mutationObserver.disconnect(); } - this.mutationObserver = new MutationObserver(() => this.attachToPage(onMobileYouTube)); + this.mutationObserver = new MutationObserver(() => this.attachToPage(onMobileYouTube, onInvidious)); this.mutationObserver.observe(referenceNode, { childList: true, @@ -66,7 +66,8 @@ export class CategoryPill { setVisibility(show: boolean): void { const newState = { - show + show, + open: show ? this.ref.current?.state.open : false }; if (this.ref.current) { From 8e964b40b308c966a53fa3590499827bb1492ab4 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 5 Jan 2022 20:49:56 -0500 Subject: [PATCH 34/44] Add vote buttons to pill that open on click --- public/content.css | 1 + src/components/CategoryPillComponent.tsx | 51 ++++++++++++- src/components/SkipNoticeComponent.tsx | 25 +----- src/content.ts | 73 ++++++++++-------- src/js-components/skipButtonControlBar.ts | 9 ++- src/messageTypes.ts | 5 ++ src/popup.ts | 10 ++- src/render/CategoryPill.tsx | 29 ++++--- src/utils.ts | 92 ----------------------- src/utils/animationUtils.ts | 78 +++++++++++++++++++ src/utils/genericUtils.ts | 26 ++++++- src/utils/noticeUtils.ts | 21 ++++++ 12 files changed, 249 insertions(+), 171 deletions(-) create mode 100644 src/utils/animationUtils.ts create mode 100644 src/utils/noticeUtils.ts diff --git a/public/content.css b/public/content.css index aabc6790..a8730b1d 100644 --- a/public/content.css +++ b/public/content.css @@ -622,6 +622,7 @@ input::-webkit-inner-spin-button { cursor: pointer; font-size: 75%; height: 100%; + align-items: center; } .sponsorBlockCategoryPillTitleSection { diff --git a/src/components/CategoryPillComponent.tsx b/src/components/CategoryPillComponent.tsx index 1ec12695..7b760b1f 100644 --- a/src/components/CategoryPillComponent.tsx +++ b/src/components/CategoryPillComponent.tsx @@ -1,9 +1,16 @@ import * as React from "react"; import Config from "../config"; -import { SponsorTime } from "../types"; +import { Category, SegmentUUID, SponsorTime } from "../types"; + +import ThumbsUpSvg from "../svg-icons/thumbs_up_svg"; +import ThumbsDownSvg from "../svg-icons/thumbs_down_svg"; +import { downvoteButtonColor, SkipNoticeAction } from "../utils/noticeUtils"; +import { VoteResponse } from "../messageTypes"; +import { AnimationUtils } from "../utils/animationUtils"; +import { GenericUtils } from "../utils/genericUtils"; export interface CategoryPillProps { - + vote: (type: number, UUID: SegmentUUID, category?: Category) => Promise; } export interface CategoryPillState { @@ -32,7 +39,8 @@ class CategoryPillComponent extends React.Component + className={"sponsorBlockCategoryPill"} + onClick={() => this.state.show && this.setState({ open: !this.state.open })}> @@ -41,9 +49,46 @@ class CategoryPillComponent extends React.Component + + {this.state.open && ( + <> + {/* Upvote Button */} +
this.vote(event, 1)}> + +
+ + {/* Downvote Button */} +
this.vote(event, 0)}> + +
+ + )}
); } + + private async vote(event: React.MouseEvent, type: number): Promise { + event.stopPropagation(); + if (this.state.segment) { + const stopAnimation = AnimationUtils.applyLoadingAnimation(event.currentTarget as HTMLElement, 0.3); + + const response = await this.props.vote(type, this.state.segment.UUID); + await stopAnimation(); + + if (response.successType == 1 || (response.successType == -1 && response.statusCode == 429)) { + this.setState({ open: false }); + } else if (response.statusCode !== 403) { + alert(GenericUtils.getErrorMessage(response.statusCode, response.responseText)); + } + } + } } export default CategoryPillComponent; diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index da771853..49dac9ab 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -4,7 +4,6 @@ import Config from "../config" import { Category, ContentContainer, CategoryActionType, SponsorHideType, SponsorTime, NoticeVisbilityMode, ActionType, SponsorSourceType, SegmentUUID } from "../types"; import NoticeComponent from "./NoticeComponent"; import NoticeTextSelectionComponent from "./NoticeTextSectionComponent"; -import SubmissionNotice from "../render/SubmissionNotice"; import Utils from "../utils"; const utils = new Utils(); @@ -13,15 +12,7 @@ import { getCategoryActionType, getSkippingText } from "../utils/categoryUtils"; import ThumbsUpSvg from "../svg-icons/thumbs_up_svg"; import ThumbsDownSvg from "../svg-icons/thumbs_down_svg"; import PencilSvg from "../svg-icons/pencil_svg"; - -export enum SkipNoticeAction { - None, - Upvote, - Downvote, - CategoryVote, - CopyDownvote, - Unskip -} +import { downvoteButtonColor, SkipNoticeAction } from "../utils/noticeUtils"; export interface SkipNoticeProps { segments: SponsorTime[]; @@ -216,7 +207,7 @@ class SkipNoticeComponent extends React.Component this.prepAction(SkipNoticeAction.Downvote)}> - + {/* Copy and Downvote Button */} @@ -279,7 +270,7 @@ class SkipNoticeComponent extends React.Component this.prepAction(SkipNoticeAction.CopyDownvote)}> {chrome.i18n.getMessage("CopyAndDownvote")} @@ -727,16 +718,6 @@ 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 Config.config.isVip && this.segments[0].locked === 1 ? this.lockedColor : this.unselectedColor; - } - } - private getUnskipText(): string { switch (this.props.segments[0].actionType) { case ActionType.Mute: { diff --git a/src/content.ts b/src/content.ts index f9e3172a..07bf607c 100644 --- a/src/content.ts +++ b/src/content.ts @@ -11,7 +11,7 @@ import PreviewBar, {PreviewBarSegment} from "./js-components/previewBar"; import SkipNotice from "./render/SkipNotice"; import SkipNoticeComponent from "./components/SkipNoticeComponent"; import SubmissionNotice from "./render/SubmissionNotice"; -import { Message, MessageResponse } from "./messageTypes"; +import { Message, MessageResponse, VoteResponse } from "./messageTypes"; import * as Chat from "./js-components/chat"; import { getCategoryActionType } from "./utils/categoryUtils"; import { SkipButtonControlBar } from "./js-components/skipButtonControlBar"; @@ -19,6 +19,8 @@ import { Tooltip } from "./render/Tooltip"; import { getStartTimeFromUrl } from "./utils/urlParser"; import { getControls } from "./utils/pageUtils"; import { CategoryPill } from "./render/CategoryPill"; +import { AnimationUtils } from "./utils/animationUtils"; +import { GenericUtils } from "./utils/genericUtils"; // Hack to get the CSS loaded on permission-based sites (Invidious) utils.wait(() => Config.config !== null, 5000, 10).then(addCSS); @@ -647,7 +649,7 @@ function setupCategoryPill() { categoryPill = new CategoryPill(); } - categoryPill.attachToPage(onMobileYouTube, onInvidious); + categoryPill.attachToPage(onMobileYouTube, onInvidious, voteAsync); } async function sponsorsLookup(id: string, keepOldSubmissions = true) { @@ -1369,7 +1371,7 @@ async function createButtons(): Promise { && playerButtons["info"]?.button && !controlsWithEventListeners.includes(controlsContainer)) { controlsWithEventListeners.push(controlsContainer); - utils.setupAutoHideAnimation(playerButtons["info"].button, controlsContainer); + AnimationUtils.setupAutoHideAnimation(playerButtons["info"].button, controlsContainer); } } @@ -1649,13 +1651,37 @@ function clearSponsorTimes() { } //if skipNotice is null, it will not affect the UI -function vote(type: number, UUID: SegmentUUID, category?: Category, skipNotice?: SkipNoticeComponent) { +async function vote(type: number, UUID: SegmentUUID, category?: Category, skipNotice?: SkipNoticeComponent): Promise { if (skipNotice !== null && skipNotice !== undefined) { //add loading info skipNotice.addVoteButtonInfo.bind(skipNotice)(chrome.i18n.getMessage("Loading")) skipNotice.setNoticeInfoMessage.bind(skipNotice)(); } + const response = await voteAsync(type, UUID, category); + if (response != undefined) { + //see if it was a success or failure + if (skipNotice != null) { + if (response.successType == 1 || (response.successType == -1 && response.statusCode == 429)) { + //success (treat rate limits as a success) + skipNotice.afterVote.bind(skipNotice)(utils.getSponsorTimeFromUUID(sponsorTimes, UUID), type, category); + } else if (response.successType == -1) { + if (response.statusCode === 403 && response.responseText.startsWith("Vote rejected due to a warning from a moderator.")) { + skipNotice.setNoticeInfoMessageWithOnClick.bind(skipNotice)(() => { + Chat.openWarningChat(response.responseText); + skipNotice.closeListener.call(skipNotice); + }, chrome.i18n.getMessage("voteRejectedWarning")); + } else { + skipNotice.setNoticeInfoMessage.bind(skipNotice)(GenericUtils.getErrorMessage(response.statusCode, response.responseText)) + } + + skipNotice.resetVoteButtonInfo.bind(skipNotice)(); + } + } + } +} + +async function voteAsync(type: number, UUID: SegmentUUID, category?: Category): Promise { const sponsorIndex = utils.getSponsorIndexFromUUID(sponsorTimes, UUID); // Don't vote for preview sponsors @@ -1675,33 +1701,14 @@ function vote(type: number, UUID: SegmentUUID, category?: Category, skipNotice?: Config.config.skipCount = Config.config.skipCount + factor; } - - chrome.runtime.sendMessage({ - message: "submitVote", - type: type, - UUID: UUID, - category: category - }, function(response) { - if (response != undefined) { - //see if it was a success or failure - if (skipNotice != null) { - if (response.successType == 1 || (response.successType == -1 && response.statusCode == 429)) { - //success (treat rate limits as a success) - skipNotice.afterVote.bind(skipNotice)(utils.getSponsorTimeFromUUID(sponsorTimes, UUID), type, category); - } else if (response.successType == -1) { - if (response.statusCode === 403 && response.responseText.startsWith("Vote rejected due to a warning from a moderator.")) { - skipNotice.setNoticeInfoMessageWithOnClick.bind(skipNotice)(() => { - Chat.openWarningChat(response.responseText); - skipNotice.closeListener.call(skipNotice); - }, chrome.i18n.getMessage("voteRejectedWarning")); - } else { - skipNotice.setNoticeInfoMessage.bind(skipNotice)(utils.getErrorMessage(response.statusCode, response.responseText)) - } - - skipNotice.resetVoteButtonInfo.bind(skipNotice)(); - } - } - } + + return new Promise((resolve) => { + chrome.runtime.sendMessage({ + message: "submitVote", + type: type, + UUID: UUID, + category: category + }, resolve); }); } @@ -1744,7 +1751,7 @@ function submitSponsorTimes() { async function sendSubmitMessage() { // Add loading animation playerButtons.submit.image.src = chrome.extension.getURL("icons/PlayerUploadIconSponsorBlocker.svg"); - const stopAnimation = utils.applyLoadingAnimation(playerButtons.submit.button, 1, () => updateEditButtonsOnPlayer()); + const stopAnimation = AnimationUtils.applyLoadingAnimation(playerButtons.submit.button, 1, () => updateEditButtonsOnPlayer()); //check if a sponsor exceeds the duration of the video for (let i = 0; i < sponsorTimesSubmitting.length; i++) { @@ -1816,7 +1823,7 @@ async function sendSubmitMessage() { if (response.status === 403 && response.responseText.startsWith("Submission rejected due to a warning from a moderator.")) { Chat.openWarningChat(response.responseText); } else { - alert(utils.getErrorMessage(response.status, response.responseText)); + alert(GenericUtils.getErrorMessage(response.status, response.responseText)); } } } diff --git a/src/js-components/skipButtonControlBar.ts b/src/js-components/skipButtonControlBar.ts index 32018307..a27eefd0 100644 --- a/src/js-components/skipButtonControlBar.ts +++ b/src/js-components/skipButtonControlBar.ts @@ -3,6 +3,7 @@ import { SponsorTime } from "../types"; import { getSkippingText } from "../utils/categoryUtils"; import Utils from "../utils"; +import { AnimationUtils } from "../utils/animationUtils"; const utils = new Utils(); export interface SkipButtonControlBarProps { @@ -80,9 +81,9 @@ export class SkipButtonControlBar { } if (!this.onMobileYouTube) { - utils.setupAutoHideAnimation(this.skipIcon, mountingContainer, false, false); + AnimationUtils.setupAutoHideAnimation(this.skipIcon, mountingContainer, false, false); } else { - const { hide, show } = utils.setupCustomHideAnimation(this.skipIcon, mountingContainer, false, false); + const { hide, show } = AnimationUtils.setupCustomHideAnimation(this.skipIcon, mountingContainer, false, false); this.hideButton = hide; this.showButton = show; } @@ -104,7 +105,7 @@ export class SkipButtonControlBar { this.refreshText(); this.textContainer?.classList?.remove("hidden"); - utils.disableAutoHideAnimation(this.skipIcon); + AnimationUtils.disableAutoHideAnimation(this.skipIcon); this.startTimer(); } @@ -160,7 +161,7 @@ export class SkipButtonControlBar { this.getChapterPrefix()?.classList?.add("hidden"); - utils.enableAutoHideAnimation(this.skipIcon); + AnimationUtils.enableAutoHideAnimation(this.skipIcon); if (this.onMobileYouTube) { this.hideButton(); } diff --git a/src/messageTypes.ts b/src/messageTypes.ts index 4989c741..1b2949ea 100644 --- a/src/messageTypes.ts +++ b/src/messageTypes.ts @@ -61,3 +61,8 @@ export type MessageResponse = | IsChannelWhitelistedResponse | Record; +export interface VoteResponse { + successType: number; + statusCode: number; + responseText: string; +} \ No newline at end of file diff --git a/src/popup.ts b/src/popup.ts index 8b5366f3..4d1d6743 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -5,6 +5,8 @@ import { SponsorTime, SponsorHideType, CategoryActionType, ActionType } from "./ import { Message, MessageResponse, IsInfoFoundMessageResponse } from "./messageTypes"; import { showDonationLink } from "./utils/configUtils"; import { getCategoryActionType } from "./utils/categoryUtils"; +import { AnimationUtils } from "./utils/animationUtils"; +import { GenericUtils } from "./utils/genericUtils"; const utils = new Utils(); interface MessageListener { @@ -449,7 +451,7 @@ async function runThePopup(messageListener?: MessageListener): Promise { uuidButton.src = chrome.runtime.getURL("icons/clipboard.svg"); uuidButton.addEventListener("click", () => { navigator.clipboard.writeText(UUID); - const stopAnimation = utils.applyLoadingAnimation(uuidButton, 0.3); + const stopAnimation = AnimationUtils.applyLoadingAnimation(uuidButton, 0.3); stopAnimation(); }); @@ -555,7 +557,7 @@ async function runThePopup(messageListener?: MessageListener): Promise { PageElements.sponsorTimesContributionsContainer.classList.remove("hidden"); } else { - PageElements.setUsernameStatus.innerText = utils.getErrorMessage(response.status, response.responseText); + PageElements.setUsernameStatus.innerText = GenericUtils.getErrorMessage(response.status, response.responseText); } }); @@ -596,7 +598,7 @@ async function runThePopup(messageListener?: MessageListener): Promise { //success (treat rate limits as a success) addVoteMessage(chrome.i18n.getMessage("voted"), UUID); } else if (response.successType == -1) { - addVoteMessage(utils.getErrorMessage(response.statusCode, response.responseText), UUID); + addVoteMessage(GenericUtils.getErrorMessage(response.statusCode, response.responseText), UUID); } } }); @@ -699,7 +701,7 @@ async function runThePopup(messageListener?: MessageListener): Promise { } function refreshSegments() { - const stopAnimation = utils.applyLoadingAnimation(PageElements.refreshSegmentsButton, 0.3); + const stopAnimation = AnimationUtils.applyLoadingAnimation(PageElements.refreshSegmentsButton, 0.3); messageHandler.query({ active: true, diff --git a/src/render/CategoryPill.tsx b/src/render/CategoryPill.tsx index 4681a813..d3530c38 100644 --- a/src/render/CategoryPill.tsx +++ b/src/render/CategoryPill.tsx @@ -1,7 +1,8 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; import CategoryPillComponent, { CategoryPillState } from "../components/CategoryPillComponent"; -import { SponsorTime } from "../types"; +import { VoteResponse } from "../messageTypes"; +import { Category, SegmentUUID, SponsorTime } from "../types"; import { GenericUtils } from "../utils/genericUtils"; export class CategoryPill { @@ -16,7 +17,8 @@ export class CategoryPill { this.ref = React.createRef(); } - async attachToPage(onMobileYouTube: boolean, onInvidious: boolean): Promise { + async attachToPage(onMobileYouTube: boolean, onInvidious: boolean, + vote: (type: number, UUID: SegmentUUID, category?: Category) => Promise): Promise { const referenceNode = await GenericUtils.wait(() => // YouTube, Mobile YouTube, Invidious @@ -35,7 +37,7 @@ export class CategoryPill { } ReactDOM.render( - , + , this.container ); @@ -49,7 +51,7 @@ export class CategoryPill { this.mutationObserver.disconnect(); } - this.mutationObserver = new MutationObserver(() => this.attachToPage(onMobileYouTube, onInvidious)); + this.mutationObserver = new MutationObserver(() => this.attachToPage(onMobileYouTube, onInvidious, vote)); this.mutationObserver.observe(referenceNode, { childList: true, @@ -78,15 +80,18 @@ export class CategoryPill { } setSegment(segment: SponsorTime): void { - const newState = { - segment, - show: true - }; + if (this.ref.current?.state?.segment !== segment) { + const newState = { + segment, + show: true, + open: false + }; - if (this.ref.current) { - this.ref.current?.setState(newState); - } else { - this.unsavedState = newState; + if (this.ref.current) { + this.ref.current?.setState(newState); + } else { + this.unsavedState = newState; + } } } diff --git a/src/utils.ts b/src/utils.ts index 7cffa45a..760b2d65 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -143,75 +143,6 @@ export default class Utils { }); } - /** - * Starts a spinning animation and returns a function to be called when it should be stopped - * The callback will be called when the animation is finished - * It waits until a full rotation is complete - */ - applyLoadingAnimation(element: HTMLElement, time: number, callback?: () => void): () => void { - element.style.animation = `rotate ${time}s 0s infinite`; - - return () => { - // Make the animation finite - element.style.animation = `rotate ${time}s`; - - // When the animation is over, hide the button - const animationEndListener = () => { - if (callback) callback(); - - element.style.animation = "none"; - - element.removeEventListener("animationend", animationEndListener); - }; - - element.addEventListener("animationend", animationEndListener); - } - } - - setupCustomHideAnimation(element: Element, container: Element, enabled = true, rightSlide = true): { hide: () => void, show: () => void } { - if (enabled) element.classList.add("autoHiding"); - element.classList.add("hidden"); - element.classList.add("animationDone"); - if (!rightSlide) element.classList.add("autoHideLeft"); - - let mouseEntered = false; - - return { - hide: () => { - mouseEntered = false; - if (element.classList.contains("autoHiding")) { - element.classList.add("hidden"); - } - }, - show: () => { - mouseEntered = true; - element.classList.remove("animationDone"); - - // Wait for next event loop - setTimeout(() => { - if (mouseEntered) element.classList.remove("hidden") - }, 10); - } - }; - } - - setupAutoHideAnimation(element: Element, container: Element, enabled = true, rightSlide = true): void { - const { hide, show } = this.setupCustomHideAnimation(element, container, enabled, rightSlide); - - container.addEventListener("mouseleave", () => hide()); - container.addEventListener("mouseenter", () => show()); - } - - enableAutoHideAnimation(element: Element): void { - element.classList.add("autoHiding"); - element.classList.add("hidden"); - } - - disableAutoHideAnimation(element: Element): void { - element.classList.remove("autoHiding"); - element.classList.remove("hidden"); - } - /** * Merges any overlapping timestamp ranges into single segments and returns them as a new array. */ @@ -343,29 +274,6 @@ export default class Utils { } } - /** - * Gets the error message in a nice string - * - * @param {int} statusCode - * @returns {string} errorMessage - */ - getErrorMessage(statusCode: number, responseText: string): string { - let errorMessage = ""; - const postFix = (responseText ? "\n\n" + responseText : ""); - - if([400, 429, 409, 502, 503, 0].includes(statusCode)) { - //treat them the same - if (statusCode == 503) statusCode = 502; - - errorMessage = chrome.i18n.getMessage(statusCode + "") + " " + chrome.i18n.getMessage("errorCode") + statusCode - + "\n\n" + chrome.i18n.getMessage("statusReminder"); - } else { - errorMessage = chrome.i18n.getMessage("connectionError") + statusCode; - } - - return errorMessage + postFix; - } - /** * Sends a request to a custom server * diff --git a/src/utils/animationUtils.ts b/src/utils/animationUtils.ts new file mode 100644 index 00000000..933e6446 --- /dev/null +++ b/src/utils/animationUtils.ts @@ -0,0 +1,78 @@ + /** + * Starts a spinning animation and returns a function to be called when it should be stopped + * The callback will be called when the animation is finished + * It waits until a full rotation is complete + */ +function applyLoadingAnimation(element: HTMLElement, time: number, callback?: () => void): () => Promise { + element.style.animation = `rotate ${time}s 0s infinite`; + + return async () => new Promise((resolve) => { + // Make the animation finite + element.style.animation = `rotate ${time}s`; + + // When the animation is over, hide the button + const animationEndListener = () => { + if (callback) callback(); + + element.style.animation = "none"; + + element.removeEventListener("animationend", animationEndListener); + + resolve(); + }; + + element.addEventListener("animationend", animationEndListener); + }); +} + +function setupCustomHideAnimation(element: Element, container: Element, enabled = true, rightSlide = true): { hide: () => void, show: () => void } { + if (enabled) element.classList.add("autoHiding"); + element.classList.add("hidden"); + element.classList.add("animationDone"); + if (!rightSlide) element.classList.add("autoHideLeft"); + + let mouseEntered = false; + + return { + hide: () => { + mouseEntered = false; + if (element.classList.contains("autoHiding")) { + element.classList.add("hidden"); + } + }, + show: () => { + mouseEntered = true; + element.classList.remove("animationDone"); + + // Wait for next event loop + setTimeout(() => { + if (mouseEntered) element.classList.remove("hidden") + }, 10); + } + }; +} + +function setupAutoHideAnimation(element: Element, container: Element, enabled = true, rightSlide = true): void { + const { hide, show } = this.setupCustomHideAnimation(element, container, enabled, rightSlide); + + container.addEventListener("mouseleave", () => hide()); + container.addEventListener("mouseenter", () => show()); +} + +function enableAutoHideAnimation(element: Element): void { + element.classList.add("autoHiding"); + element.classList.add("hidden"); +} + +function disableAutoHideAnimation(element: Element): void { + element.classList.remove("autoHiding"); + element.classList.remove("hidden"); +} + +export const AnimationUtils = { + applyLoadingAnimation, + setupAutoHideAnimation, + setupCustomHideAnimation, + enableAutoHideAnimation, + disableAutoHideAnimation +}; \ No newline at end of file diff --git a/src/utils/genericUtils.ts b/src/utils/genericUtils.ts index 32cf83f5..b146e57a 100644 --- a/src/utils/genericUtils.ts +++ b/src/utils/genericUtils.ts @@ -21,6 +21,30 @@ async function wait(condition: () => T | false, timeout = 5000, check = 100): }); } +/** + * Gets the error message in a nice string + * + * @param {int} statusCode + * @returns {string} errorMessage + */ +function getErrorMessage(statusCode: number, responseText: string): string { + let errorMessage = ""; + const postFix = (responseText ? "\n\n" + responseText : ""); + + if([400, 429, 409, 502, 503, 0].includes(statusCode)) { + //treat them the same + if (statusCode == 503) statusCode = 502; + + errorMessage = chrome.i18n.getMessage(statusCode + "") + " " + chrome.i18n.getMessage("errorCode") + statusCode + + "\n\n" + chrome.i18n.getMessage("statusReminder"); + } else { + errorMessage = chrome.i18n.getMessage("connectionError") + statusCode; + } + + return errorMessage + postFix; +} + export const GenericUtils = { - wait + wait, + getErrorMessage } \ No newline at end of file diff --git a/src/utils/noticeUtils.ts b/src/utils/noticeUtils.ts new file mode 100644 index 00000000..5d77063b --- /dev/null +++ b/src/utils/noticeUtils.ts @@ -0,0 +1,21 @@ +import Config from "../config"; +import { SponsorTime } from "../types"; + +export enum SkipNoticeAction { + None, + Upvote, + Downvote, + CategoryVote, + CopyDownvote, + Unskip +} + +export function downvoteButtonColor(segments: SponsorTime[], actionState: SkipNoticeAction, downvoteType: SkipNoticeAction): string { + // Also used for "Copy and Downvote" + if (segments?.length > 1) { + return (actionState === downvoteType) ? Config.config.colorPalette.red : Config.config.colorPalette.white; + } else { + // You dont have segment selectors so the lockbutton needs to be colored and cannot be selected. + return Config.config.isVip && segments[0].locked === 1 ? Config.config.colorPalette.locked : Config.config.colorPalette.white; + } +} \ No newline at end of file From c7d5011cc092470e5c7ff6ab5ef2a22703039d7f Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 6 Jan 2022 01:19:20 -0500 Subject: [PATCH 35/44] Add tooltip recommending full video report for large segments --- public/_locales/en/messages.json | 3 ++ src/components/SponsorTimeEditComponent.tsx | 39 ++++++++++++++++++--- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index c862ba00..7066e5f7 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -741,6 +741,9 @@ "message": "Got it", "description": "Used as the button to dismiss a tooltip" }, + "fullVideoTooltipWarning": { + "message": "This segment is large. If the whole video is about one topic, then change from \"Skip\" to \"Full Video\". See the guidelines for more information." + }, "experiementOptOut": { "message": "Opt-out of all future experiments", "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." diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index 1a734cb5..eaf83a91 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -40,6 +40,7 @@ class SponsorTimeEditComponent extends React.Component this.configUpdate(); Config.configListeners.push(this.configUpdate.bind(this)); } + + this.checkToShowFullVideoWarning(); } componentWillUnmount(): void { @@ -82,6 +85,8 @@ class SponsorTimeEditComponent extends React.Component { Config.config.scrollToEditTimeUpdate = true }); + } + } + + showToolTip(text: string, buttonFunction?: () => void): boolean { + const element = document.getElementById("sponsorTimesContainer" + this.idSuffix); + if (element) { new RectangleTooltip({ - text: chrome.i18n.getMessage("SponsorTimeEditScrollNewFeature"), + text, referenceNode: element.parentElement, prependElement: element, timeout: 15, @@ -300,10 +312,27 @@ class SponsorTimeEditComponent extends React.Component { Config.config.scrollToEditTimeUpdate = true }, + buttonFunction, fontSize: "14px", maxHeight: "200px" }); + + return true; + } else { + return false; + } + } + + checkToShowFullVideoWarning(): void { + const sponsorTime = this.props.contentContainer().sponsorTimesSubmitting[this.props.index]; + const segmentDuration = sponsorTime.segment[1] - sponsorTime.segment[0]; + const videoPercentage = segmentDuration / this.props.contentContainer().v.duration; + + if (videoPercentage > 0.6 && !this.fullVideoWarningShown + && (sponsorTime.category === "sponsor" || sponsorTime.category === "selfpromo" || sponsorTime.category === "chooseACategory")) { + if (this.showToolTip(chrome.i18n.getMessage("fullVideoTooltipWarning"))) { + this.fullVideoWarningShown = true; + } } } From 1aac863df0108dd77b32a9602fdf91dad61fa81c Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 6 Jan 2022 01:54:47 -0500 Subject: [PATCH 36/44] Fix error --- src/render/SkipNotice.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/render/SkipNotice.tsx b/src/render/SkipNotice.tsx index 5113c2da..b3ea571c 100644 --- a/src/render/SkipNotice.tsx +++ b/src/render/SkipNotice.tsx @@ -4,9 +4,10 @@ import * as ReactDOM from "react-dom"; import Utils from "../utils"; const utils = new Utils(); -import SkipNoticeComponent, { SkipNoticeAction } from "../components/SkipNoticeComponent"; +import SkipNoticeComponent from "../components/SkipNoticeComponent"; import { SponsorTime, ContentContainer, NoticeVisbilityMode } from "../types"; import Config from "../config"; +import { SkipNoticeAction } from "../utils/noticeUtils"; class SkipNotice { segments: SponsorTime[]; From 4d724deba3ccd281f169cfb2fd31303181090e52 Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 6 Jan 2022 02:06:55 -0500 Subject: [PATCH 37/44] Add title text and hide on downvote --- public/_locales/en/messages.json | 3 +++ src/components/CategoryPillComponent.tsx | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 7066e5f7..d7855a69 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -744,6 +744,9 @@ "fullVideoTooltipWarning": { "message": "This segment is large. If the whole video is about one topic, then change from \"Skip\" to \"Full Video\". See the guidelines for more information." }, + "categoryPillTitleText": { + "message": "This entire video is labeled as this category and is too tightly integrated to be able to separate" + }, "experiementOptOut": { "message": "Opt-out of all future experiments", "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." diff --git a/src/components/CategoryPillComponent.tsx b/src/components/CategoryPillComponent.tsx index 7b760b1f..abe6aaf0 100644 --- a/src/components/CategoryPillComponent.tsx +++ b/src/components/CategoryPillComponent.tsx @@ -40,6 +40,7 @@ class CategoryPillComponent extends React.Component this.state.show && this.setState({ open: !this.state.open })}> Date: Thu, 6 Jan 2022 02:10:28 -0500 Subject: [PATCH 38/44] Fix voting on category pill on mobile --- src/components/CategoryPillComponent.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/CategoryPillComponent.tsx b/src/components/CategoryPillComponent.tsx index abe6aaf0..c22bbbb9 100644 --- a/src/components/CategoryPillComponent.tsx +++ b/src/components/CategoryPillComponent.tsx @@ -41,7 +41,7 @@ class CategoryPillComponent extends React.Component this.state.show && this.setState({ open: !this.state.open })}> + onClick={(e) => this.toggleOpen(e)}> @@ -58,7 +58,7 @@ class CategoryPillComponent extends React.Component this.vote(event, 1)}> + onClick={(e) => this.vote(e, 1)}> @@ -75,6 +75,14 @@ class CategoryPillComponent extends React.Component { event.stopPropagation(); if (this.state.segment) { From d16a409db27b04feec58de412baa2984f36e3832 Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 6 Jan 2022 15:18:40 -0500 Subject: [PATCH 39/44] Show black text on pill for unpaid promotion --- public/content.css | 1 - src/components/CategoryPillComponent.tsx | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/content.css b/public/content.css index a8730b1d..bfcd4f30 100644 --- a/public/content.css +++ b/public/content.css @@ -618,7 +618,6 @@ input::-webkit-inner-spin-button { padding-left: 8px; padding-right: 8px; margin-right: 3px; - color: white; cursor: pointer; font-size: 75%; height: 100%; diff --git a/src/components/CategoryPillComponent.tsx b/src/components/CategoryPillComponent.tsx index c22bbbb9..6c7e0437 100644 --- a/src/components/CategoryPillComponent.tsx +++ b/src/components/CategoryPillComponent.tsx @@ -34,7 +34,8 @@ class CategoryPillComponent extends React.Component Date: Thu, 6 Jan 2022 16:26:59 -0500 Subject: [PATCH 40/44] Add option to disable showing full video segments --- public/_locales/en/messages.json | 4 ++++ public/options/options.html | 16 ++++++++++++++++ src/config.ts | 2 ++ src/content.ts | 14 +++++++++++++- 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index d7855a69..ac7cbe09 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -624,6 +624,10 @@ "muteSegments": { "message": "Allow segments that mute audio instead of skip" }, + "fullVideoSegments": { + "message": "Show an icon when a video is entirely an advertisement", + "description": "Referring to the category pill that is now shown on videos that are entirely sponsor or entirely selfpromo" + }, "colorFormatIncorrect": { "message": "Your color is formatted incorrectly. It should be a 3 or 6 digit hex code with a number sign at the beginning." }, diff --git a/public/options/options.html b/public/options/options.html index 1fbcf1b1..657b2d4d 100644 --- a/public/options/options.html +++ b/public/options/options.html @@ -66,6 +66,22 @@
+
+ + +
+
+
+
+

diff --git a/src/config.ts b/src/config.ts index b4a1a9cd..ae6f45aa 100644 --- a/src/config.ts +++ b/src/config.ts @@ -21,6 +21,7 @@ interface SBConfig { showTimeWithSkips: boolean, disableSkipping: boolean, muteSegments: boolean, + fullVideoSegments: boolean, trackViewCount: boolean, trackViewCountInPrivate: boolean, dontShowNotice: boolean, @@ -177,6 +178,7 @@ const Config: SBObject = { showTimeWithSkips: true, disableSkipping: false, muteSegments: true, + fullVideoSegments: true, trackViewCount: true, trackViewCountInPrivate: true, dontShowNotice: false, diff --git a/src/content.ts b/src/content.ts index 07bf607c..2b719591 100644 --- a/src/content.ts +++ b/src/content.ts @@ -687,7 +687,7 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) { const hashPrefix = (await utils.getHash(id, 1)).substr(0, 4); const response = await utils.asyncRequestToServer('GET', "/api/skipSegments/" + hashPrefix, { categories, - actionTypes: Config.config.muteSegments ? [ActionType.Skip, ActionType.Mute, ActionType.Full] : [ActionType.Skip, ActionType.Full], + actionTypes: getEnabledActionTypes(), userAgent: `${chrome.runtime.id}`, ...extraRequestData }); @@ -768,6 +768,18 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) { lookupVipInformation(id); } +function getEnabledActionTypes(): ActionType[] { + const actionTypes = [ActionType.Skip]; + if (Config.config.muteSegments) { + actionTypes.push(ActionType.Mute); + } + if (Config.config.fullVideoSegments) { + actionTypes.push(ActionType.Full); + } + + return actionTypes; +} + function lookupVipInformation(id: string): void { updateVipInfo().then((isVip) => { if (isVip) { From 7b917fb2b62bd25c73d30cdf6412fc801ec49082 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Thu, 6 Jan 2022 16:57:12 -0500 Subject: [PATCH 41/44] New Crowdin updates (#1112) --- public/_locales/da/messages.json | 259 ++++++++++++++++++++++++++++++- public/_locales/tr/messages.json | 62 ++++++++ 2 files changed, 319 insertions(+), 2 deletions(-) diff --git a/public/_locales/da/messages.json b/public/_locales/da/messages.json index 45d959af..ab09d065 100644 --- a/public/_locales/da/messages.json +++ b/public/_locales/da/messages.json @@ -119,7 +119,7 @@ "message": "Er du sikker på, at du vil indsende dette?" }, "whitelistChannel": { - "message": "Hvidliste kanal" + "message": "Hvidlist kanal" }, "removeFromWhitelist": { "message": "Fjern kanal fra hvidliste" @@ -131,7 +131,7 @@ "message": "Indsendelser" }, "savedPeopleFrom": { - "message": "Du har reddet folk fra " + "message": "Du har sparret folk " }, "viewLeaderboard": { "message": "Topliste" @@ -430,12 +430,30 @@ "skipNoticeDuration": { "message": "Spring meddelelsesvarighed over (sekunder):" }, + "skipNoticeDurationDescription": { + "message": "Overspringsmeddelelsen vil blive på skærmen i mindst så længe. For manuel spring, kan den være synlig i længere tid." + }, + "shortCheck": { + "message": "Den følgende indsendelse er kortere end din minimums varighed indstilling. Dette kan betyde, at den allerede er indsendt, og bare bliver ignoreret på grund af denne indstilling. Er du sikker på, at du vil indsende?" + }, + "showUploadButton": { + "message": "Vis Upload-Knap" + }, + "customServerAddress": { + "message": "SponsorBlock Serveradresse" + }, + "customServerAddressDescription": { + "message": "Adressen SponsorBlock bruger til at foretage opkald til serveren. Med mindre du har din egen serverinstans, bør dette ikke ændres." + }, "save": { "message": "Gem" }, "reset": { "message": "Nulstil" }, + "customAddressError": { + "message": "Denne adresse er ikke i den rigtige form. Sørg for at du har http:// eller https:// i begyndelsen og ingen efterfølgende skråstreger." + }, "areYouSureReset": { "message": "Er du sikker på, at du ønsker at nulstille dette?" }, @@ -445,9 +463,18 @@ "exportOptions": { "message": "Importer/Eksporter Alle Indstillinger" }, + "whatExportOptions": { + "message": "Dette er hele din konfiguration i JSON. Dette inkluderer dit bruger-ID, så sørg for at dele dette med omtanke." + }, "setOptions": { "message": "Indstil Indstillinger" }, + "exportOptionsWarning": { + "message": "Advarsel: Ændring af indstillingerne er permanent, og kan ødelægge din installation. Er du sikker på, at du vil gøre dette? Sørg for at sikkerhedskopiere din gamle for en sikkerheds skyld." + }, + "incorrectlyFormattedOptions": { + "message": "Denne JSON er ikke formateret korrekt. Dine indstillinger er ikke blevet ændret." + }, "confirmNoticeTitle": { "message": "Indsend Segment" }, @@ -472,9 +499,24 @@ "edit": { "message": "Rediger" }, + "copyDebugInformation": { + "message": "Kopier Fejlretningsoplysninger Til Udklipsholder" + }, + "copyDebugInformationFailed": { + "message": "Det lykkedes ikke at skrive til udklipsholderen" + }, + "copyDebugInformationOptions": { + "message": "Kopierer information til udklipsholderen, der skal leveres til en udvikler, når en fejl indberettes / når en udvikler anmoder om det. Følsomme oplysninger som dit bruger-ID, hvidlistede kanaler og brugerdefineret serveradresse er blevet fjernet. Dog indeholder det oplysninger som din brugeragent, browser, operativsystem og versionsnummer for udvidelsen. " + }, + "copyDebugInformationComplete": { + "message": "Fejlfindingsinformationen er blevet kopieret til klippebordet. Du er velkommen til at fjerne alle oplysninger, du helst ikke vil dele. Gem dette i en tekstfil eller indsæt i fejlrapporten." + }, "theKey": { "message": "Tasten" }, + "keyAlreadyUsed": { + "message": "er bundet til en anden handling. Venligst vælg en anden nøgle." + }, "to": { "message": "til", "description": "Used between segments. Example: 1:20 to 1:30" @@ -482,27 +524,115 @@ "category_sponsor": { "message": "Sponsor" }, + "category_sponsor_description": { + "message": "Betalt kampagne, betalte henvisninger og direkte reklamer. Ikke for selvpromoverende eller gratis shoutouts til årsager/skabere/hjemmesider/produkter, de kan lide." + }, "category_selfpromo": { "message": "Ubetalt/Egen Markedsføring" }, + "category_selfpromo_description": { + "message": "Ligesom \"sponsor\" bortset fra ubetalt- eller selfmarkedsføring. Dette inkluderer sektioner om merchandise, donationer eller oplysninger om hvem, de har samarbejdet med." + }, "category_interaction": { "message": "Påmindelse Om Interaktion (Abonnement)" }, + "category_interaction_description": { + "message": "Når der er en kort påmindelse om at like, abonnere eller følge dem midt i indholdet. Hvis den er lang eller om noget specifikt, bør den i stedet være under selvpromovering." + }, "category_interaction_short": { "message": "Påmindelse Om Interaktion" }, "category_intro": { "message": "Pause/Intro-Animation" }, + "category_intro_description": { + "message": "Et interval uden reelt indhold. Kunne være en pause, statisk ramme, gentagelse af animation. Dette bør ikke bruges til overgange som indeholder information." + }, "category_intro_short": { "message": "Pause" }, "category_outro": { "message": "Slutkort/Kreditter" }, + "category_outro_description": { + "message": "Medvirkende eller når YouTube-endcards vises. Ikke for konklusioner med information." + }, "category_preview": { "message": "Forhåndsvisning/Opsamling" }, + "category_preview_description": { + "message": "Hurtig opsummering af tidligere episoder eller en forsmag på, hvad der kommer senere i den aktuelle video. Er beregnet til sammenklippede klip, ikke til talte resuméer." + }, + "category_filler": { + "message": "Fyldningstangent" + }, + "category_filler_description": { + "message": "Tangential scener kun tilføjet for fyldstof eller humor, som ikke er nødvendige for at forstå videoens hovedindhold. Dette bør ikke omfatte segmenter, der gtiver kontekst eller bagrundsoplysninger." + }, + "category_filler_short": { + "message": "Fyldstof" + }, + "category_music_offtopic": { + "message": "Musik: Ikke-Musikalsk Sektion" + }, + "category_music_offtopic_description": { + "message": "Kun til brug i musikvideoer. Dette bør kun bruges til sektioner af musikvideoer, der ikke allerede er dækket af en anden kategori." + }, + "category_music_offtopic_short": { + "message": "Ikke-Musikalsk" + }, + "category_poi_highlight": { + "message": "Fremhæv" + }, + "category_poi_highlight_description": { + "message": "Den del af videoen, som de fleste mennesker leder efter. Svarende til \"Video starter ved x\" kommentarer." + }, + "category_livestream_messages": { + "message": "Livestream: Donations-/Beskedsaflæsning" + }, + "category_livestream_messages_short": { + "message": "Læsning Af Meddelelser" + }, + "autoSkip": { + "message": "Auto Spring Over" + }, + "manualSkip": { + "message": "Manuel Spring Over" + }, + "showOverlay": { + "message": "Vis I Søgebar" + }, + "disable": { + "message": "Deaktiver" + }, + "autoSkip_POI": { + "message": "Spring automatisk til starten" + }, + "manualSkip_POI": { + "message": "Spørg, når videoen indlæses" + }, + "showOverlay_POI": { + "message": "Vis I Søgebar" + }, + "autoSkipOnMusicVideos": { + "message": "Spring automatisk over alle segmenter, når der er et ikke-musik-segment" + }, + "muteSegments": { + "message": "Tillad segmenter som dæmper lyden i stedet for at springe over" + }, + "colorFormatIncorrect": { + "message": "Din farve er formateret forkert. Det skal være en 3-6 cifret hex-kode med et nummerskilt i begyndelsen." + }, + "previewColor": { + "message": "Ikke-Indsendt Farve", + "description": "Referring to submissions that have not been sent to the server yet." + }, + "seekBarColor": { + "message": "Søgebarsfarve" + }, + "category": { + "message": "Kategori" + }, "skipOption": { "message": "Spring Over Indstillinger", "description": "Used on the options page to describe the ways to skip the segment (auto skip, manual, etc.)" @@ -510,6 +640,12 @@ "enableTestingServer": { "message": "Aktiver Betatestserver" }, + "whatEnableTestingServer": { + "message": "Dine indsendelser og stemmer TÆLLER IKKE med i hovedserveren. Brug kun dette til testformål." + }, + "testingServerWarning": { + "message": "Alle indsendelser og stemmer TÆLLES IKKE med i hovedserveren, når du opretter forbindelse til testserveren. Sørg for at deaktivere dette, når du ønsker at foretage rigtige indsendelser." + }, "bracketNow": { "message": "(Nu)" }, @@ -519,6 +655,16 @@ "chooseACategory": { "message": "Vælg en Kategori" }, + "enableThisCategoryFirst": { + "message": "Hvis du vil indsende segmenter med kategorien \"{0}\", skal du aktivere den i indstillingerne. Du vil blive omdirigeret til indstillingerne nu.", + "description": "Used when submitting segments to only let them select a certain category if they have it enabled in the options." + }, + "poiOnlyOneSegment": { + "message": "Advarsel: Denne type segment kan have maksimalt en aktiv ad gangen. Indsendelse af flere vil få en tilfældig til at blive vist." + }, + "youMustSelectACategory": { + "message": "Du skal vælge en kategori for alle segmenter, du indsender!" + }, "bracketEnd": { "message": "(Slut)" }, @@ -528,6 +674,16 @@ "hiddenDueToDuration": { "message": "skjult: for kort" }, + "channelDataNotFound": { + "description": "This error appears in an alert when they try to whitelist a channel and the extension is unable to determine what channel they are looking at.", + "message": "Kanal-ID er ikke indlæst endnu. Hvis du bruger en integreret video, så prøv i stedet at bruge YouTube-hjemmesiden. Dette kunne også være forårsaget af ændringer i YouTube-layout. Hvis du mener det, så lav en kommentar her:" + }, + "videoInfoFetchFailed": { + "message": "Det ser ud til, at noget blokerer SponsorBlock's evne til at hente videodata. Se https://github.com/ajayyy/SponsorBlock/issues/741 for mere info." + }, + "youtubePermissionRequest": { + "message": "Det ser ud til, at SponsorBlock ikke kan nå YouTube APIen. Acceptér tilladelsesprompten som vises næste gang, vent et par sekunder, og genindlæs siden." + }, "acceptPermission": { "message": "Accepter tilladelse" }, @@ -537,12 +693,27 @@ "permissionRequestFailed": { "message": "Tilladelsesanmodning mislykkedes, klikkede du på afvis?" }, + "adblockerIssueWhitelist": { + "message": "Hvis du ikke kan løse dette problem, skal du deaktivere indstillingen 'Tving Kanaltjek Inden Springning', da SponsorBlock ikke er i stand til at hente kanaloplysningerne for denne video" + }, + "forceChannelCheck": { + "message": "Tving Kanaltjek Inden Springning" + }, + "whatForceChannelCheck": { + "message": "Som standard vil den springe segmenter over med det samme, før den overhovedet ved, hvad kanalen er. Som standard kan nogle segmenter i starten af videoen blive sprunget over på kanaler på whitelisten. Hvis du aktiverer denne indstilling, forhindrer du dette, men det vil medføre en lille forsinkelse, da det kan tage noget tid at få kanal-ID'et. Denne forsinkelse kan være umærkelig, hvis du har hurtigt internet." + }, + "forceChannelCheckPopup": { + "message": "Overvej At Aktivere \"Tving Kanaltjek Inden Springning\"" + }, "downvoteDescription": { "message": "Ukorrekt/Forkert Timing" }, "incorrectCategory": { "message": "Skift Kategori" }, + "nonMusicCategoryOnMusic": { + "message": "Denne video er kategoriseret som musik. Er du sikker på, at denne har en sponsor? Hvis dette faktisk er et \"Ikke-musik segment\", skal du åbne udvidelsesindstillingerne og aktivere denne kategori. Derefter kan du indsende dette segment som \"Ikke-musik\" i stedet for sponsor. Læs venligst retningslinjerne, hvis du er forvirret." + }, "multipleSegments": { "message": "Adskillige Segmenter" }, @@ -556,6 +727,9 @@ "categoryUpdate1": { "message": "Kategorier er her!" }, + "categoryUpdate2": { + "message": "Åbn mulighederne for at springe intros, outros, merch osv. over." + }, "help": { "message": "Hjælp" }, @@ -570,6 +744,13 @@ "hideForever": { "message": "Skjul for evigt" }, + "warningChatInfo": { + "message": "Du har fået en advarsel og kan midlertidigt ikke indsende segmenter. Det betyder, at vi har bemærket, at du har begået nogle almindelige fejl, som ikke er skadelige. Bekræft venligst, at du har forstået reglerne, så fjerner vi advarslen. Du kan også deltage i denne chat ved hjælp af discord.gg/SponsorBlock eller matrix.to/#/##sponsor:ajay.app" + }, + "voteRejectedWarning": { + "message": "Afstemningen blev afvist på grund af en advarsel. Klik for at åbne en chat for at løse problemet, eller kom tilbage senere, når du har tid.", + "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": "Doner" }, @@ -582,13 +763,87 @@ "helpPageReviewOptions": { "message": "Venligst gennemgå indstillingerne nedenfor" }, + "helpPageFeatureDisclaimer": { + "message": "Mange funktioner er deaktiveret som standard. Hvis du vil springe intros, outros over, bruge Invidious osv., skal du aktivere dem nedenfor. Du kan også skjule/vise brugergrænsefladeelementer." + }, "helpPageHowSkippingWorks": { "message": "Hvordan spring over virker" }, + "helpPageHowSkippingWorks1": { + "message": "Videosegmenter vil automatisk blive sprunget over, hvis de findes i databasen. Du kan åbne popup-vinduet ved at klikke på ikonet for udvidelsen for at få et eksempel på, hvad de er." + }, + "helpPageHowSkippingWorks2": { + "message": "Når du springer et segment over, får du besked, når du springer et segment over. Hvis timingen virker forkert, kan du stemme ned ved at klikke på downvote! Du kan også stemme i popup-vinduet." + }, "Submitting": { "message": "Indsendelse" }, + "helpPageSubmitting1": { + "message": "Indsendelse kan enten ske i popup-vinduet ved at trykke på \"Segment Begynder Nu\"-knappen eller i videoafspilleren med knapperne på afspilleren." + }, + "helpPageSubmitting2": { + "message": "Ved at klikke på play-knappen vises starten af et segment, og ved at klikke på stop-ikonet vises slutningen. Du kan forberede flere sponsorer, før du trykker på Send. Hvis du klikker på upload-knappen, sendes det. Hvis du klikker på skraldespanden, slettes den." + }, "Editing": { "message": "Redigering" + }, + "helpPageEditing1": { + "message": "Hvis du har lavet en fejl, kan du redigere eller slette dine segmenter, når du har klikket på pil op knappen." + }, + "helpPageTooSlow": { + "message": "Det er for langsomt" + }, + "helpPageTooSlow1": { + "message": "Der er genvejstaster, hvis du vil bruge dem. Tryk på semikolon-tasten for at angive start/slutning af en sponsor segment og klik på apostrof for at indsende. Disse kan ændres i valgmulighederne. Hvis du ikke bruger QWERTY, bør du sandsynligvis ændre tastebindingen." + }, + "helpPageCopyOfDatabase": { + "message": "Kan jeg få en kopi af databasen? Hvad sker der, hvis du forsvinder?" + }, + "helpPageCopyOfDatabase1": { + "message": "Databasen er offentlig og tilgængelig på" + }, + "helpPageCopyOfDatabase2": { + "message": "Kildekoden er frit tilgængelig. Så selvom der sker noget med mig, går dine indsendelser ikke tabt." + }, + "helpPageNews": { + "message": "Nyheder og hvordan det er lavet" + }, + "helpPageSourceCode": { + "message": "Hvor kan jeg få kildekoden?" + }, + "Credits": { + "message": "Anerkendelser" + }, + "LearnMore": { + "message": "Læs mere" + }, + "CopyDownvoteButtonInfo": { + "message": "Nedstemmer og opretter en lokal kopi for dig at genindsende" + }, + "OpenCategoryWikiPage": { + "message": "Åbn denne kategoris wikiside." + }, + "CopyAndDownvote": { + "message": "Kopier og nedstem" + }, + "ContinueVoting": { + "message": "Fortsæt Afstemning" + }, + "ChangeCategoryTooltip": { + "message": "Dette vil øjeblikkeligt gælde for dine indsendelser" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Brug musehjulet, mens du holder musen over redigeringsfeltet for hurtigt at justere tiden. Kombinationer af ctrl eller shift-tastenerne kan bruges til at finjustere ændringerne." + }, + "fillerNewFeature": { + "message": "Nyt! Spring tangenter over og vittigheder med fyldstofkategorien. Aktivér i indstillinger" + }, + "dayAbbreviation": { + "message": "d", + "description": "100d" + }, + "hourAbbreviation": { + "message": "t", + "description": "100h" } } diff --git a/public/_locales/tr/messages.json b/public/_locales/tr/messages.json index 303ae68a..aec88cfb 100644 --- a/public/_locales/tr/messages.json +++ b/public/_locales/tr/messages.json @@ -236,6 +236,12 @@ "noticeVisibilityMode2": { "message": "Tüm Küçük Atlama Bildirimleri" }, + "noticeVisibilityMode3": { + "message": "Otomatik Atlama için Soluk Atlama Bildirimleri" + }, + "noticeVisibilityMode4": { + "message": "Tüm Soluk Atlama Bildirimleri" + }, "longDescription": { "message": "SponsorBlock, sponsorları, giriş ve bitiş kısımlarını, abonelik hatırlatıcılarını ve YouTube videolarının diğer can sıkıcı kısımlarını atlamanıza olanak tanır. SponsorBlock, herkesin sponsorlu kısımları ve YouTube videolarının diğer kısımlarının başlangıç ve bitiş zamanlarını göndermesine izin veren kitle kaynaklı bir tarayıcı uzantısıdır. Bir kişi bu bilgiyi gönderdikten sonra, bu uzantıya sahip diğer herkes sponsorlu kısımları hemen atlayacaktır. Müzik videolarının müzik dışı bölümlerini de atlayabilirsiniz.", "description": "Full description of the extension on the store pages." @@ -557,6 +563,15 @@ "category_preview_description": { "message": "Önceki bölümlerin bir özeti veya geçerli videonun içeriğine yönelik bir ön izleme. Bu özellik birleştirilmiş klipler içindir, konuşarak anlatılan özetleri kapsamaz." }, + "category_filler": { + "message": "Alakasız Konu" + }, + "category_filler_description": { + "message": "Videonun ana içeriğini anlamak için gerekli olmayan, yalnızca alakasız konu veya mizah için eklenen sahneler. Bu, alakalı veya arka plan ayrıntısı veren kısımları içermemelidir." + }, + "category_filler_short": { + "message": "Alakasız Konu" + }, "category_music_offtopic": { "message": "Müzik: Müzik Olmayan Bölüm" }, @@ -693,6 +708,9 @@ "downvoteDescription": { "message": "Hatalı/Yanlış Zaman" }, + "incorrectCategory": { + "message": "Kategoriyi değiştir" + }, "nonMusicCategoryOnMusic": { "message": "Bu video müzik olarak sınıflandırılmıştır. Bunun bir sponsor olduğundan emin misin? Bu aslında bir \"Müzik Dışı bölüm\" ise, uzantı seçeneklerini açın ve bu kategoriyi etkinleştirin. Ardından, bu kısmı sponsor yerine \"Müzik Olmayan\" olarak gönderebilirsiniz. Kafanız karıştıysa lütfen yönergeleri okuyun." }, @@ -726,6 +744,9 @@ "hideForever": { "message": "Asla gösterme" }, + "warningChatInfo": { + "message": "Bir uyarı aldınız ve geçici olarak gönderim yapamazsınız. Bu, kötü niyetli olmayan bazı yaygın hatalar yaptığınızı fark ettiğimiz anlamına gelir, lütfen kuralları anladığınızı onaylayın, uyarıyı sonra kaldıracağız. Bu konuşmaya discord.gg/SponsorBlock ya da matrix.to/#/#sponsor:ajay.app kullanarak katılabilirsiniz." + }, "voteRejectedWarning": { "message": "Bir uyarı nedeniyle oy reddedildi. Çözüm bulmak için buraya tıklayarak bir sohbet açın veya daha sonra vaktiniz olduğunda uğrayın.", "description": "This is an integrated chat panel that will appearing allowing them to talk to the Discord/Matrix chat without leaving their browser." @@ -757,6 +778,12 @@ "Submitting": { "message": "Gönderme" }, + "helpPageSubmitting1": { + "message": "Gönderi, açılır pencerede \"Kısım Şimdi Başlıyor\" düğmesine basılarak veya oynatıcıdaki düğmelerle video oynatıcıda yapılabilir." + }, + "helpPageSubmitting2": { + "message": "Oynat düğmesine tıklamak bir kısımın başlangıcını, durdurma simgesine tıklamak ise bitişini gösterir. Gönder düğmesine basmadan önce birden fazla sponsor hazırlayabilirsiniz. Yükle düğmesine tıklamak kısımları gönderir. Çöp kutusuna tıkladığınızda silinir." + }, "Editing": { "message": "Düzenleme" }, @@ -766,6 +793,9 @@ "helpPageTooSlow": { "message": "Bu fazla yavaş" }, + "helpPageTooSlow1": { + "message": "Kullanmak isterseniz kısayol tuşları var. Sponsorlu kısmın başlangıcını/sonunu belirtmek için noktalı virgül tuşuna basın ve göndermek için kesme işaretine tıklayın. Bu tuşlar ayarlarda değiştirilebilir. QWERTY klavye kullanmıyorsanız, tuş ayarlarını değiştirmelisiniz." + }, "helpPageCopyOfDatabase": { "message": "Veri tabanının bir kopyasını alabilir miyim? Bir gün ortadan kaybolursanız ne olacak?" }, @@ -775,6 +805,9 @@ "helpPageCopyOfDatabase2": { "message": "Kaynak koduna serbestçe erişilebilir. Ben bir gün bu dünyada yalan olsam dahi, sizin gönderdiğiniz kısımlar kaybolmayacak." }, + "helpPageNews": { + "message": "Haberler ve nasıl yapılır" + }, "helpPageSourceCode": { "message": "Kaynak koduna nereden ulaşabilirim?" }, @@ -783,5 +816,34 @@ }, "LearnMore": { "message": "Dahasını Öğren" + }, + "CopyDownvoteButtonInfo": { + "message": "Olumsuz oy verir ve yeni bir kısım seçmeniz için bir kopya oluşturur" + }, + "OpenCategoryWikiPage": { + "message": "Bu kategorinin wiki sayfasını açın." + }, + "CopyAndDownvote": { + "message": "Kopyala ve olumsuz" + }, + "ContinueVoting": { + "message": "Oylamaya devam et" + }, + "ChangeCategoryTooltip": { + "message": "Bu, kısımlarınız için anında geçerli olur" + }, + "SponsorTimeEditScrollNewFeature": { + "message": "Zaman aralığını hızlı bir şekilde ayarlamak için düzenleme kutusunun üzerinde fare tekerini kullanın. Değişikliklere ince ayar yapmak için ctrl veya shift tuşunun kombinasyonları kullanılabilir." + }, + "fillerNewFeature": { + "message": "Yeni! Alakasız Konu kategorisiyle boş muhabbetleri ve şakaları atlayın. Ayarlarda etkinleştir" + }, + "dayAbbreviation": { + "message": "d", + "description": "100d" + }, + "hourAbbreviation": { + "message": "h", + "description": "100h" } } From e9b217c6858bb217731e28caf980e630fd2e892f Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 6 Jan 2022 20:08:12 -0500 Subject: [PATCH 42/44] Add tooltip about full video update --- public/_locales/en/messages.json | 4 ++-- public/content.css | 6 ++++++ src/background.ts | 3 +++ src/config.ts | 2 ++ src/render/CategoryPill.tsx | 22 ++++++++++++++++++++-- src/render/Tooltip.tsx | 8 ++++++-- 6 files changed, 39 insertions(+), 6 deletions(-) diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index ac7cbe09..a6bd1ca0 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -849,8 +849,8 @@ "SponsorTimeEditScrollNewFeature": { "message": "Use your mousewheel while hovering over the edit box to quickly adjust the time. Combinations of the ctrl or shift key can be used to fine tune the changes." }, - "fillerNewFeature": { - "message": "New! Skip tangents and jokes with the filler category. Enable in options" + "categoryPillNewFeature": { + "message": "New! See when a video is entirely sponsored or self-promotion" }, "dayAbbreviation": { "message": "d", diff --git a/public/content.css b/public/content.css index bfcd4f30..4c15212e 100644 --- a/public/content.css +++ b/public/content.css @@ -586,6 +586,12 @@ input::-webkit-inner-spin-button { max-width: 300px; white-space: normal; line-height: 1.5em; + color: white; + font-size: 12px; +} + +.sponsorBlockTooltip a { + color: white; } .sponsorBlockTooltip::after { diff --git a/src/background.ts b/src/background.ts index 2d5ffe8e..5a7bacd5 100644 --- a/src/background.ts +++ b/src/background.ts @@ -80,6 +80,9 @@ chrome.runtime.onInstalled.addListener(function () { const newUserID = utils.generateUserID(); //save this UUID Config.config.userID = newUserID; + + // Don't show update notification + Config.config.categoryPillUpdate = true; } }, 1500); }); diff --git a/src/config.ts b/src/config.ts index ae6f45aa..e2a4a4d0 100644 --- a/src/config.ts +++ b/src/config.ts @@ -53,6 +53,7 @@ interface SBConfig { locked: string }, scrollToEditTimeUpdate: boolean, + categoryPillUpdate: boolean, // What categories should be skipped categorySelections: CategorySelection[], @@ -205,6 +206,7 @@ const Config: SBObject = { autoHideInfoButton: true, autoSkipOnMusicVideos: false, scrollToEditTimeUpdate: false, // false means the tooltip will be shown + categoryPillUpdate: false, categorySelections: [{ name: "sponsor" as Category, diff --git a/src/render/CategoryPill.tsx b/src/render/CategoryPill.tsx index d3530c38..fc20c6db 100644 --- a/src/render/CategoryPill.tsx +++ b/src/render/CategoryPill.tsx @@ -1,9 +1,11 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; import CategoryPillComponent, { CategoryPillState } from "../components/CategoryPillComponent"; +import Config from "../config"; import { VoteResponse } from "../messageTypes"; import { Category, SegmentUUID, SponsorTime } from "../types"; import { GenericUtils } from "../utils/genericUtils"; +import { Tooltip } from "./Tooltip"; export class CategoryPill { container: HTMLElement; @@ -79,7 +81,7 @@ export class CategoryPill { } } - setSegment(segment: SponsorTime): void { + async setSegment(segment: SponsorTime): Promise { if (this.ref.current?.state?.segment !== segment) { const newState = { segment, @@ -92,7 +94,23 @@ export class CategoryPill { } else { this.unsavedState = newState; } + + if (!Config.config.categoryPillUpdate) { + Config.config.categoryPillUpdate = true; + + const watchDiv = await GenericUtils.wait(() => document.querySelector("#info.ytd-watch-flexy") as HTMLElement); + if (watchDiv) { + new Tooltip({ + text: chrome.i18n.getMessage("categoryPillNewFeature"), + link: "https://blog.ajay.app/full-video-sponsorblock", + referenceNode: watchDiv, + prependElement: watchDiv.firstChild as HTMLElement, + bottomOffset: "-10px", + opacity: 0.95, + timeout: 50000 + }); + } + } } - } } \ No newline at end of file diff --git a/src/render/Tooltip.tsx b/src/render/Tooltip.tsx index 7bb2e1f3..3fe14410 100644 --- a/src/render/Tooltip.tsx +++ b/src/render/Tooltip.tsx @@ -8,6 +8,7 @@ export interface TooltipProps { prependElement?: HTMLElement, // Element to append before bottomOffset?: string timeout?: number; + opacity?: number; } export class Tooltip { @@ -18,11 +19,12 @@ export class Tooltip { constructor(props: TooltipProps) { props.bottomOffset ??= "70px"; + props.opacity ??= 0.7; this.text = props.text; this.container = document.createElement('div'); this.container.id = "sponsorTooltip" + props.text; - this.container.style.display = "relative"; + this.container.style.position = "relative"; if (props.prependElement) { props.referenceNode.insertBefore(this.container, props.prependElement); @@ -34,8 +36,10 @@ export class Tooltip { this.timer = setTimeout(() => this.close(), props.timeout * 1000); } + const backgroundColor = `rgba(28, 28, 28, ${props.opacity})`; + ReactDOM.render( -
Date: Thu, 6 Jan 2022 20:59:54 -0500 Subject: [PATCH 43/44] bump version --- manifest/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest/manifest.json b/manifest/manifest.json index 181118c6..48f3d5fe 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "SponsorBlock", - "version": "3.7.2", + "version": "4.0", "default_locale": "en", "description": "__MSG_Description__", "homepage_url": "https://sponsor.ajay.app", From 2cf89b1850a682bbf6d5d98ff97e500d03701b55 Mon Sep 17 00:00:00 2001 From: Michael C Date: Fri, 7 Jan 2022 02:00:04 -0500 Subject: [PATCH 44/44] fix "cannot read properties of null" when voting on full video tag --- src/utils/noticeUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/noticeUtils.ts b/src/utils/noticeUtils.ts index 5d77063b..e2489f74 100644 --- a/src/utils/noticeUtils.ts +++ b/src/utils/noticeUtils.ts @@ -16,6 +16,6 @@ export function downvoteButtonColor(segments: SponsorTime[], actionState: SkipNo return (actionState === downvoteType) ? Config.config.colorPalette.red : Config.config.colorPalette.white; } else { // You dont have segment selectors so the lockbutton needs to be colored and cannot be selected. - return Config.config.isVip && segments[0].locked === 1 ? Config.config.colorPalette.locked : Config.config.colorPalette.white; + return Config.config.isVip && segments?.[0].locked === 1 ? Config.config.colorPalette.locked : Config.config.colorPalette.white; } } \ No newline at end of file