mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 13:37:04 +03:00
Merge branch 'master' of https://github.com/ajayyy/SponsorBlock into chapters
This commit is contained in:
19
README.md
19
README.md
@@ -60,21 +60,24 @@ You can read the API docs [here](https://wiki.sponsor.ajay.app/index.php/API_Doc
|
||||
|
||||
# Building
|
||||
|
||||
You must have Node.js 16 installed.
|
||||
You must have [Node.js 16](https://nodejs.org/) and npm installed.
|
||||
|
||||
Rename `config.json.example` to `config.json` and adjust configuration as desired.
|
||||
1. Copy the file `config.json.example` to `config.json` and adjust configuration as desired.
|
||||
|
||||
There are also other build scripts available. Install `npm`, then run `npm install` in the repository to install dependencies.
|
||||
- You will need to repeat this step in the future if you get build errors related to `CompileConfig`. This can happen for example when a new category is added.
|
||||
|
||||
Run `npm run build` to generate a Chrome extension.
|
||||
2. Run `npm install` in the repository to install dependencies.
|
||||
|
||||
Use `npm run build:firefox` to generate a Firefox extension.
|
||||
3. Run `npm run build:dev` (for Chrome) or `npm run build:dev:firefox` (for Firefox) to generate a development version of the extension with source maps.
|
||||
|
||||
The result is in `dist`. This can be loaded as an unpacked extension
|
||||
- You can also run `npm run build` (for Chrome) or `npm run build:firefox` (for Firefox) to generate a production build.
|
||||
|
||||
## Developing with a clean profile
|
||||
4. The built extension is now in `dist/`. You can load it in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/#manifest) or in Firefox as a [temporary extension](https://developer.mozilla.org/en-US/docs/Tools/about:debugging#loading_a_temporary_extension).
|
||||
|
||||
### Developing with a clean profile and hot reloading
|
||||
|
||||
Run `npm run dev` (for Chrome) or `npm run dev:firefox` (for Firefox) to run the extension using a clean browser profile with hot reloading. This uses [`web-ext run`](https://extensionworkshop.com/documentation/develop/web-ext-command-reference/#commands).
|
||||
|
||||
Run `npm run dev` to run the extension using a clean browser profile with hot reloading. Use `npm run dev:firefox` for Firefox. This uses [`web-ext run`](https://extensionworkshop.com/documentation/develop/web-ext-command-reference/#commands).
|
||||
Known chromium bug: Extension is not loaded properly on first start. Visit `chrome://extensions/` and reload the extension.
|
||||
|
||||
For Firefox for Android, use `npm run dev:firefox-android -- --adb-device <ip-address of the device>`. See the [Firefox documentation](https://extensionworkshop.com/documentation/develop/developing-extensions-for-firefox-for-android/#debug-your-extension) for more information.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "__MSG_fullName__",
|
||||
"short_name": "SponsorBlock",
|
||||
"version": "3.4.1",
|
||||
"version": "3.5.2",
|
||||
"default_locale": "en",
|
||||
"description": "__MSG_Description__",
|
||||
"homepage_url": "https://sponsor.ajay.app",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"message": "сегмент"
|
||||
},
|
||||
"Segments": {
|
||||
"message": "сегменти"
|
||||
"message": "сегмента"
|
||||
},
|
||||
"upvoteButtonInfo": {
|
||||
"message": "Одобряване на това предложение"
|
||||
@@ -131,7 +131,7 @@
|
||||
"message": "Изпратени сегменти"
|
||||
},
|
||||
"savedPeopleFrom": {
|
||||
"message": "Вие сте помогнали на хората да пропуснат "
|
||||
"message": "Помогнахте на хората да пропуснат "
|
||||
},
|
||||
"viewLeaderboard": {
|
||||
"message": "Класиране"
|
||||
@@ -156,7 +156,7 @@
|
||||
"message": "Това се използва на страницата с публичната статистика, за да покаже колко сте допринесли. Вижте го"
|
||||
},
|
||||
"Username": {
|
||||
"message": "Потребителско име"
|
||||
"message": "Потребител"
|
||||
},
|
||||
"setUsername": {
|
||||
"message": "Задайте потребителско име"
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
"reskip": {
|
||||
"message": "Spring over"
|
||||
},
|
||||
"unmute": {
|
||||
"message": "Lyd til"
|
||||
},
|
||||
"paused": {
|
||||
"message": "Sat på pause"
|
||||
},
|
||||
@@ -115,7 +118,29 @@
|
||||
"submitCheck": {
|
||||
"message": "Er du sikker på, at du vil indsende dette?"
|
||||
},
|
||||
"whitelistChannel": {
|
||||
"message": "Hvidliste kanal"
|
||||
},
|
||||
"removeFromWhitelist": {
|
||||
"message": "Fjern kanal fra hvidliste"
|
||||
},
|
||||
"voteOnTime": {
|
||||
"message": "Stem På Et Segment"
|
||||
},
|
||||
"Submissions": {
|
||||
"message": "Indsendelser"
|
||||
},
|
||||
"savedPeopleFrom": {
|
||||
"message": "Du har reddet folk fra "
|
||||
},
|
||||
"viewLeaderboard": {
|
||||
"message": "Topliste"
|
||||
},
|
||||
"recordTimesDescription": {
|
||||
"message": "Indsend"
|
||||
},
|
||||
"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."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -699,6 +699,9 @@
|
||||
"downvoteDescription": {
|
||||
"message": "Virheellinen/väärä aika"
|
||||
},
|
||||
"incorrectCategory": {
|
||||
"message": "Vaihda kategoria"
|
||||
},
|
||||
"nonMusicCategoryOnMusic": {
|
||||
"message": "Tämä video on luokiteltu musiikiksi. Oletko varma, että siinä on sponsori? Jos tämä on oikeasti \"Musiikiton segmentti\", avaa laajennuksen asetukset ja ota tämä kategoria käyttöön. Sitten voit lähettää tämän segmentin oikeassa kategoriassa. Lue säännöt, jos olet vielä hämilläsi."
|
||||
},
|
||||
@@ -808,6 +811,21 @@
|
||||
"LearnMore": {
|
||||
"message": "Opi lisää"
|
||||
},
|
||||
"CopyDownvoteButtonInfo": {
|
||||
"message": "Äänestää alas ja luo paikallisen kopion, jonka voit lähettää uudelleen"
|
||||
},
|
||||
"OpenCategoryWikiPage": {
|
||||
"message": "Avaa tämän kategorian wiki-sivu."
|
||||
},
|
||||
"CopyAndDownvote": {
|
||||
"message": "Kopioi ja äänestä alas"
|
||||
},
|
||||
"ContinueVoting": {
|
||||
"message": "Jatka äänestystä"
|
||||
},
|
||||
"ChangeCategoryTooltip": {
|
||||
"message": "Tämä vaikuttaa sinun segmentteihin välittömästi"
|
||||
},
|
||||
"SponsorTimeEditScrollNewFeature": {
|
||||
"message": "Käytä hiiren rullaa samalla kun osoitin on muokkauslaatikon päällä säätääksesi aikaa nopeasti. Ctrl- tai Shift-näppäimen yhdistelmiä voi käyttää muutoksien hienosäätelyyn."
|
||||
}
|
||||
|
||||
@@ -699,6 +699,9 @@
|
||||
"downvoteDescription": {
|
||||
"message": "Segment de mauvaise qualité"
|
||||
},
|
||||
"incorrectCategory": {
|
||||
"message": "Changer de catégorie"
|
||||
},
|
||||
"nonMusicCategoryOnMusic": {
|
||||
"message": "Cette vidéo est catégorisée comme de la musique. Êtes-vous sûr qu'elle est sponsorisée? S'il s'agit en fait d'un \"Segment non musical\", allez dans les options de l'extension et activez cette catégorie. Ensuite, vous pourrez soumettre ce segment en tant que \"Segment non musical\" au lieu de sponsor. Lisez les instructions en cas de confusion."
|
||||
},
|
||||
@@ -808,6 +811,21 @@
|
||||
"LearnMore": {
|
||||
"message": "En savoir plus"
|
||||
},
|
||||
"CopyDownvoteButtonInfo": {
|
||||
"message": "Vote négatif et crée une copie locale que vous pouvez soumettre à nouveau"
|
||||
},
|
||||
"OpenCategoryWikiPage": {
|
||||
"message": "Ouvrez la page wiki de cette catégorie."
|
||||
},
|
||||
"CopyAndDownvote": {
|
||||
"message": "Copier et voter contre"
|
||||
},
|
||||
"ContinueVoting": {
|
||||
"message": "Continuer à voter"
|
||||
},
|
||||
"ChangeCategoryTooltip": {
|
||||
"message": "Cela s'appliquera instantanément à vos segments"
|
||||
},
|
||||
"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."
|
||||
}
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
"reskip": {
|
||||
"message": "Preskoči opet"
|
||||
},
|
||||
"unmute": {
|
||||
"message": "Uključi zvuk"
|
||||
},
|
||||
"paused": {
|
||||
"message": "Pauzirano"
|
||||
},
|
||||
@@ -79,6 +82,15 @@
|
||||
"sponsorEnd": {
|
||||
"message": "Isječak završava sada"
|
||||
},
|
||||
"sponsorCancel": {
|
||||
"message": "Otkaži Kreiranje Segmenta"
|
||||
},
|
||||
"noVideoID": {
|
||||
"message": "Nijedan YouTube video nije pronađen.\nAko ovo nije točno, osvježite karticu."
|
||||
},
|
||||
"refreshSegments": {
|
||||
"message": "Osvježi segmente"
|
||||
},
|
||||
"success": {
|
||||
"message": "Uspjeh!"
|
||||
},
|
||||
@@ -97,15 +109,33 @@
|
||||
"openPopup": {
|
||||
"message": "Otvori okvir SponsorBlock"
|
||||
},
|
||||
"closePopup": {
|
||||
"message": "Zatvori izbornik"
|
||||
},
|
||||
"SubmitTimes": {
|
||||
"message": "Podnesi isječke"
|
||||
},
|
||||
"submitCheck": {
|
||||
"message": "Jesi li siguran da želiš unijeti ovo?"
|
||||
},
|
||||
"whitelistChannel": {
|
||||
"message": "Dopusti kanal"
|
||||
},
|
||||
"removeFromWhitelist": {
|
||||
"message": "Izbaci kanal iz bijele liste"
|
||||
},
|
||||
"voteOnTime": {
|
||||
"message": "Glasaj za isječak"
|
||||
},
|
||||
"Submissions": {
|
||||
"message": "Podnesci"
|
||||
},
|
||||
"savedPeopleFrom": {
|
||||
"message": "Sačuvali ste ljude od"
|
||||
},
|
||||
"viewLeaderboard": {
|
||||
"message": "Ljestvica"
|
||||
},
|
||||
"recordTimesDescription": {
|
||||
"message": "Pošalji"
|
||||
},
|
||||
@@ -113,21 +143,54 @@
|
||||
"message": "Uređivanje dijela prikazat će se nakon što pritisneš gumb za slanje",
|
||||
"description": "Appears in the popup to inform them that editing has been moved to the video player."
|
||||
},
|
||||
"popupHint": {
|
||||
"message": "Savjet: Možete namjestiti tipke za podnošenje u opcijama"
|
||||
},
|
||||
"clearTimesButton": {
|
||||
"message": "Očisti vremena"
|
||||
},
|
||||
"submitTimesButton": {
|
||||
"message": "Unesi vremena"
|
||||
},
|
||||
"publicStats": {
|
||||
"message": "Ovo se koristi na stranici sa javnim statistikama da se pokaže koliko se pridonijeli. Pogledajte"
|
||||
},
|
||||
"Username": {
|
||||
"message": "Korisničko ime"
|
||||
},
|
||||
"setUsername": {
|
||||
"message": "Postavi korisničko ime"
|
||||
},
|
||||
"copyPublicID": {
|
||||
"message": "Kopiraj javni UserID"
|
||||
},
|
||||
"discordAdvert": {
|
||||
"message": "Pridružite nam se u službenoj Discord zajednici i pošaljite svoje prijedloge i povrate informacije!"
|
||||
},
|
||||
"hideThis": {
|
||||
"message": "Sakrijte ovo"
|
||||
},
|
||||
"Options": {
|
||||
"message": "Opcije"
|
||||
},
|
||||
"showButtons": {
|
||||
"message": "Pokažite gumbove na YouTube Player-u"
|
||||
},
|
||||
"hideButtons": {
|
||||
"message": "Sakrite gumbove na YouTube Player-u"
|
||||
},
|
||||
"hideButtonsDescription": {
|
||||
"message": "Ovo sakrije gumbove za pridonose segmenta za preskočiti koje se pokažu na YouTuve Player-u."
|
||||
},
|
||||
"showSkipButton": {
|
||||
"message": "Ostavite gumb za preskakanje"
|
||||
},
|
||||
"showInfoButton": {
|
||||
"message": "Pokažite gumb za Informacije na YouTube Player-u"
|
||||
},
|
||||
"hideInfoButton": {
|
||||
"message": "Sakrijte gumb za Informacije na YouTube Player-u"
|
||||
},
|
||||
"showSkipNotice": {
|
||||
"message": "Pokaži obavijest nakon preskakanja isječka"
|
||||
},
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
"reskip": {
|
||||
"message": "Újra-átugrás"
|
||||
},
|
||||
"unmute": {
|
||||
"message": "Némítás feloldása"
|
||||
},
|
||||
"paused": {
|
||||
"message": "Szüneteltetve"
|
||||
},
|
||||
@@ -158,6 +161,9 @@
|
||||
"setUsername": {
|
||||
"message": "Felhasználónév megadása"
|
||||
},
|
||||
"copyPublicID": {
|
||||
"message": "Nyilvános UserID másolása"
|
||||
},
|
||||
"discordAdvert": {
|
||||
"message": "Csatlakozzon a hivatalos discord szerverhez, hogy javaslatokat és visszajelzést adhasson!"
|
||||
},
|
||||
@@ -176,6 +182,9 @@
|
||||
"hideButtonsDescription": {
|
||||
"message": "Ez elrejti az átugrandó szegmensek megjelöléséhez használt gombokat a YouTube lejátszón."
|
||||
},
|
||||
"showSkipButton": {
|
||||
"message": "Kiemeléshez ugrás gomb maradjon a lejátszón"
|
||||
},
|
||||
"showInfoButton": {
|
||||
"message": "Info gomb mutatása a YouTube lejátszón"
|
||||
},
|
||||
@@ -197,6 +206,9 @@
|
||||
"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. :)"
|
||||
},
|
||||
"enableViewTrackingInPrivate": {
|
||||
"message": "Átugrások számlálásának engedélyezése privát/inkognitó füleken"
|
||||
},
|
||||
"enableQueryByHashPrefix": {
|
||||
"message": "Lekérdezés Hash előtaggal"
|
||||
},
|
||||
@@ -215,6 +227,21 @@
|
||||
"showSkipNotice": {
|
||||
"message": "Jelezzen, ha egy szegmens át lett ugorva"
|
||||
},
|
||||
"noticeVisibilityMode0": {
|
||||
"message": "Teljes méretű átugrási értesítők"
|
||||
},
|
||||
"noticeVisibilityMode1": {
|
||||
"message": "Kis méretű átugrási értesítők Auto átugrás esetén"
|
||||
},
|
||||
"noticeVisibilityMode2": {
|
||||
"message": "Csak kis méretű átugrási értesítők"
|
||||
},
|
||||
"noticeVisibilityMode3": {
|
||||
"message": "Halvány átugrási értesítők Auto átugrás esetén"
|
||||
},
|
||||
"noticeVisibilityMode4": {
|
||||
"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.",
|
||||
"description": "Full description of the extension on the store pages."
|
||||
@@ -238,6 +265,9 @@
|
||||
"setSkipShortcut": {
|
||||
"message": "Billentyű beállítása szegmens átugráshoz"
|
||||
},
|
||||
"setStartSponsorShortcut": {
|
||||
"message": "Billentyű beállítása a szegmens kezdéséhez/befejezéséhez"
|
||||
},
|
||||
"setSubmitKeybind": {
|
||||
"message": "Billentyű beállítása a beküldés gombhoz"
|
||||
},
|
||||
@@ -269,9 +299,31 @@
|
||||
"skip": {
|
||||
"message": "Átugrás"
|
||||
},
|
||||
"mute": {
|
||||
"message": "Némítás"
|
||||
},
|
||||
"skip_category": {
|
||||
"message": "Átugorja ezt: {0}?"
|
||||
},
|
||||
"mute_category": {
|
||||
"message": "{0} némítása?"
|
||||
},
|
||||
"skip_to_category": {
|
||||
"message": "Ugrás ide: {0}?",
|
||||
"description": "Used for skipping to things (Skip to Highlight)"
|
||||
},
|
||||
"skipped": {
|
||||
"message": "{0} átugorva",
|
||||
"description": "Example: Sponsor Skipped"
|
||||
},
|
||||
"muted": {
|
||||
"message": "{0} némítva",
|
||||
"description": "Example: Sponsor Muted"
|
||||
},
|
||||
"skipped_to_category": {
|
||||
"message": "Ide ugorva: {0}",
|
||||
"description": "Used for skipping to things (Skipped to Highlight)"
|
||||
},
|
||||
"disableAutoSkip": {
|
||||
"message": "Auto átugrás kikapcsolása"
|
||||
},
|
||||
@@ -320,6 +372,9 @@
|
||||
"changeUserID": {
|
||||
"message": "UserID importálása / exportálása"
|
||||
},
|
||||
"whatChangeUserID": {
|
||||
"message": "Ez privát információnak minősül. Ez olyan, mint egy jelszó, így nem ajánlott megosztani senkivel. Ha valakinek birtokában van, megszemélyesítheti önt. Ha a nyilvános userID-ját keresi, kattintson a vágólap ikonra a felugró ablakban."
|
||||
},
|
||||
"setUserID": {
|
||||
"message": "UserID beállítása"
|
||||
},
|
||||
@@ -335,9 +390,22 @@
|
||||
"supportOtherSites": {
|
||||
"message": "Harmadik fél Youtube oldalainak támogatása"
|
||||
},
|
||||
"supportOtherSitesDescription": {
|
||||
"message": "Harmadik fél YouTube oldalainak támogatása. A támogatás bekapcsolásához el kell fogadnia az extra engedélyeket. NEM működik inkognitó módban Chrome-ban és egyéb Chromium változatokban.",
|
||||
"description": "This replaces the 'supports Invidious' option because it now works on other YouTube sites such as Cloudtube"
|
||||
},
|
||||
"supportedSites": {
|
||||
"message": "Támogatott oldalak: "
|
||||
},
|
||||
"optionsInfo": {
|
||||
"message": "Invidious támogatás engedélyezése, autoátugrás kikapcsolása, gombok eltűntetése és több."
|
||||
},
|
||||
"addInvidiousInstance": {
|
||||
"message": "Harmadik fél kliens példányának hozzáadása"
|
||||
},
|
||||
"addInvidiousInstanceDescription": {
|
||||
"message": "Egyedi példány hozzáadása. Formátuma CSAK a domain legyen. Például: invidious.ajay.app"
|
||||
},
|
||||
"add": {
|
||||
"message": "Hozzáadás"
|
||||
},
|
||||
@@ -359,6 +427,12 @@
|
||||
"minDurationDescription": {
|
||||
"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):"
|
||||
},
|
||||
"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?"
|
||||
},
|
||||
@@ -486,9 +560,15 @@
|
||||
"category_preview": {
|
||||
"message": "Előzetes/Ismétlés"
|
||||
},
|
||||
"category_preview_description": {
|
||||
"message": "Az előző részekben történtek rövid ismétlése, vagy a videó további tartalmának előzetese. Összevágott jelenetekhez, nem szóbeli összegzéshez."
|
||||
},
|
||||
"category_music_offtopic": {
|
||||
"message": "Zene: nem-zene szegmens"
|
||||
},
|
||||
"category_music_offtopic_description": {
|
||||
"message": "Csak videóklipekhez. Ezt csak videóklipek olyan részeihez szabad használni, amiket nem fed le a többi kategória."
|
||||
},
|
||||
"category_music_offtopic_short": {
|
||||
"message": "Nem-Zene"
|
||||
},
|
||||
@@ -516,9 +596,28 @@
|
||||
"disable": {
|
||||
"message": "Kikapcsol"
|
||||
},
|
||||
"autoSkip_POI": {
|
||||
"message": "Auto ugrás a kezdetéhez"
|
||||
},
|
||||
"manualSkip_POI": {
|
||||
"message": "Kérdezzen rá a videó betöltésekor"
|
||||
},
|
||||
"showOverlay_POI": {
|
||||
"message": "Megjelenítés a keresősávban"
|
||||
},
|
||||
"autoSkipOnMusicVideos": {
|
||||
"message": "Minden szegmens automatikus átugrása, ha van nem-zene szegmens"
|
||||
},
|
||||
"muteSegments": {
|
||||
"message": "Szegmensek engedélyezése, amelyek lenémítják a hangot az átugrás helyett"
|
||||
},
|
||||
"colorFormatIncorrect": {
|
||||
"message": "A szín helytelenül van formázva. Egy 3 vagy 6 számjegyből álló hex kódnak kell lennie egy kettőskereszttel az elején."
|
||||
},
|
||||
"previewColor": {
|
||||
"message": "Beküldetlen színe",
|
||||
"description": "Referring to submissions that have not been sent to the server yet."
|
||||
},
|
||||
"seekBarColor": {
|
||||
"message": "Keresősáv színe"
|
||||
},
|
||||
@@ -547,6 +646,13 @@
|
||||
"chooseACategory": {
|
||||
"message": "Válasszon kategóriát"
|
||||
},
|
||||
"enableThisCategoryFirst": {
|
||||
"message": "Hogy \"{0}\" kategóriájú szegmenst küldhessen be, először engedélyeznie kell a beállításokban. Most átirányításra kerül a beállításokhoz.",
|
||||
"description": "Used when submitting segments to only let them select a certain category if they have it enabled in the options."
|
||||
},
|
||||
"poiOnlyOneSegment": {
|
||||
"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!"
|
||||
},
|
||||
@@ -559,9 +665,28 @@
|
||||
"hiddenDueToDuration": {
|
||||
"message": "elrejtve: túl rövid"
|
||||
},
|
||||
"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": "A csatorna ID még nem került betöltésre. Ha beágyazott videót használ, próbálja meg inkább a YouTube oldalon keresztül. Ezt okozhatja még a YouTube elrendezésének változása is. Ha így gondolja, hagyjon egy kommentet itt:"
|
||||
},
|
||||
"videoInfoFetchFailed": {
|
||||
"message": "Úgy tűnik, valami korlátozza a SponsorBlock hozzáférését a videó adataihoz. További információkért látogasson el ide: https://github.com/ajayyy/SponsorBlock/issues/741 (angol nyelvű)."
|
||||
},
|
||||
"youtubePermissionRequest": {
|
||||
"message": "Úgy tűnik, a SponsorBlock nem tud csatlakozni a YouTube API-hoz. A javításhoz fogadja el a megjelenő engedélykérést, várjon néhány másodpercet, majd töltse újra az oldalt."
|
||||
},
|
||||
"acceptPermission": {
|
||||
"message": "Engedély jóváhagyása"
|
||||
},
|
||||
"permissionRequestSuccess": {
|
||||
"message": "Engedélykérés sikeres!"
|
||||
},
|
||||
"permissionRequestFailed": {
|
||||
"message": "Engedélykérés sikertelen. Nem nyomott az elutasításra?"
|
||||
},
|
||||
"adblockerIssueWhitelist": {
|
||||
"message": "Ha nem sikerül megoldani a problémát, kapcsolja ki a \"Csatorna ellenőrzése átugrás előtt\" opciót, mert a SponsorBlock nem tudja megszerezni a csatorna-információkat ehhez a videóhoz"
|
||||
},
|
||||
"forceChannelCheck": {
|
||||
"message": "Csatorna ellenőrzése átugrás előtt"
|
||||
},
|
||||
@@ -574,6 +699,9 @@
|
||||
"downvoteDescription": {
|
||||
"message": "Helytelen/rossz időzítés"
|
||||
},
|
||||
"incorrectCategory": {
|
||||
"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."
|
||||
},
|
||||
@@ -600,28 +728,105 @@
|
||||
"message": "Értettem",
|
||||
"description": "Used as the button to dismiss a tooltip"
|
||||
},
|
||||
"experiementOptOut": {
|
||||
"message": "Minden további kísérlet elutasítása",
|
||||
"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": "Eltüntetés örökre"
|
||||
},
|
||||
"warningChatInfo": {
|
||||
"message": "Ön figyelmeztetést kapott, és ideiglenesen nem tud szegmenseket beküldeni. Ez azt jelenti, hogy észrevettük, hogy néhány ártalmatlan gyakori hibát vétett. Kérjük erősítse meg, hogy megértette a szabályokat és eltávolítjuk a figyelmeztetést. Ehhez a beszélgetéshez csatlakozhat a discord.gg/SponsorBlock vagy matrix.to/#/#sponsor:ajay.app címeken is."
|
||||
},
|
||||
"voteRejectedWarning": {
|
||||
"message": "Szavazás visszautasítva figyelmeztetés miatt. Kattintson, hogy megnyisson egy beszélgetést a tisztázásához, vagy jöjjön vissza később, amikor ideje van.",
|
||||
"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": "Támogatás"
|
||||
},
|
||||
"hideDonationLink": {
|
||||
"message": "Támogatás link elrejtése"
|
||||
},
|
||||
"helpPageThanksForInstalling": {
|
||||
"message": "Köszönjük, hogy telepítette a SponsorBlockot."
|
||||
},
|
||||
"helpPageReviewOptions": {
|
||||
"message": "Kérjük, nézze át az alábbi beállításokat"
|
||||
},
|
||||
"helpPageFeatureDisclaimer": {
|
||||
"message": "Sok funkció le van tiltva alapból. Ha át akar ugrani bevezetőket, záróképernyőket, Invidioust használna, stb., engedélyezze őket alább. Lehetőség van a felület különböző elemeinek elrejtésére/megjelenítésére is."
|
||||
},
|
||||
"helpPageHowSkippingWorks": {
|
||||
"message": "Az átugrás működése"
|
||||
},
|
||||
"helpPageHowSkippingWorks1": {
|
||||
"message": "A videók szegmensei automatikusan átugrásra kerülnek, ha szerepelnek az adatbázisban. Megnyithatja a felugró ablakot a bővítmény ikonjára kattintva, hogy megtekinthesse őket."
|
||||
},
|
||||
"helpPageHowSkippingWorks2": {
|
||||
"message": "Ahányszor átugrik egy szegmenst, kapni fog egy értesítést. Ha rossznak tűnik az időzítés, szavazza le a leszavazás gombra kattintva! A felugró ablakban is szavazhat."
|
||||
},
|
||||
"Submitting": {
|
||||
"message": "Küldés"
|
||||
},
|
||||
"helpPageSubmitting1": {
|
||||
"message": "Beküldeni lehet a felugró ablakban a \"Szegmens eleje\" gombra kattintva, vagy a videó lejátszón lévő gombokkal."
|
||||
},
|
||||
"helpPageSubmitting2": {
|
||||
"message": "A lejátszás gomb megnyomása jelezte a szegmens kezdetét és a stop gomb megnyomása jelzi a végét. Több szponzort is előkészíthet, mielőtt a beküldésre nyomna. A feltöltés gombra kattintva beküldésre kerülnek a szegmensek. A szemetesre kattintva kitörlődnek."
|
||||
},
|
||||
"Editing": {
|
||||
"message": "Szerkesztés"
|
||||
},
|
||||
"helpPageEditing1": {
|
||||
"message": "Ha hibázott, szerkesztheti, vagy törölheti a szegmenseit, a felfele nyílra kattintást követően."
|
||||
},
|
||||
"helpPageTooSlow": {
|
||||
"message": "Ez túl lassú"
|
||||
},
|
||||
"helpPageTooSlow1": {
|
||||
"message": "Vannak gyorsbillentyűk is, ha használni szeretné őket. Nyomja meg a pontosvessző billentyűt egy szponzor szegmens elejének/végének jelzéséhez és nyomja meg a vesszőt a beküldéshez. Ezek módosíthatók a beállításokban. Ha nem QWERTY-t használ, valószínűleg szükséges lesz megváltoztatnia a billentyűket."
|
||||
},
|
||||
"helpPageCopyOfDatabase": {
|
||||
"message": "Szerezhetek egy másolatot az adatbázisról? Mi történik, ha eltűnik a fejlesztő?"
|
||||
},
|
||||
"helpPageCopyOfDatabase1": {
|
||||
"message": "Az adatbázis nyilvános, és elérhető itt:"
|
||||
},
|
||||
"helpPageCopyOfDatabase2": {
|
||||
"message": "A forráskód szabadon elérhető. Tehát még ha valami történne is velem, a beküldések nem vesznek el."
|
||||
},
|
||||
"helpPageNews": {
|
||||
"message": "Hírek és hogyan készül"
|
||||
},
|
||||
"helpPageSourceCode": {
|
||||
"message": "Hol szerezhetem meg a forráskódot?"
|
||||
},
|
||||
"Credits": {
|
||||
"message": "Készítők"
|
||||
},
|
||||
"highlightNewFeature": {
|
||||
"message": "Új! Juss a videó lényegéhez csak egy kattintással, az új kiemelés kategóriával"
|
||||
},
|
||||
"LearnMore": {
|
||||
"message": "Tudj meg többet"
|
||||
},
|
||||
"CopyDownvoteButtonInfo": {
|
||||
"message": "Leszavazza és készít egy helyi másolatot, amit beküldhet"
|
||||
},
|
||||
"OpenCategoryWikiPage": {
|
||||
"message": "A kategória wiki lapjának megnyitása."
|
||||
},
|
||||
"CopyAndDownvote": {
|
||||
"message": "Másol és leszavaz"
|
||||
},
|
||||
"ContinueVoting": {
|
||||
"message": "Szavazás folytatása"
|
||||
},
|
||||
"ChangeCategoryTooltip": {
|
||||
"message": "Ez azonnal érvényes lesz a szegmenseire"
|
||||
},
|
||||
"SponsorTimeEditScrollNewFeature": {
|
||||
"message": "Használja egérgörgőjét a szerkesztő mező fölött, hogy gyorsan módosíthassa az időt. A ctrl vagy shift billentyűk kombinációjával finomhangolhatja a változás mértékét."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -699,6 +699,9 @@
|
||||
"downvoteDescription": {
|
||||
"message": "잘못된 타이밍입니다"
|
||||
},
|
||||
"incorrectCategory": {
|
||||
"message": "카테고리 변경"
|
||||
},
|
||||
"nonMusicCategoryOnMusic": {
|
||||
"message": "이 영상은 음악 영상으로 분류됩니다. 정말로 스폰서가 있는 것이 확실한가요? 만약 음악 이외의 구간인 경우, 확장 옵션을 열어 이 카테고리를 활성화 하세요. 그리고, 이 구간을 스폰서 대신 음악이 아닌 구간으로 제출하세요. 헷갈릴 경우 가이드라인을 읽으세요."
|
||||
},
|
||||
@@ -808,6 +811,21 @@
|
||||
"LearnMore": {
|
||||
"message": "더보기"
|
||||
},
|
||||
"CopyDownvoteButtonInfo": {
|
||||
"message": "반대에 투표한 뒤 다시 제출할 수 있도록 미제출 사본을 생성합니다"
|
||||
},
|
||||
"OpenCategoryWikiPage": {
|
||||
"message": "해당 카테고리의 위키 페이지를 엽니다."
|
||||
},
|
||||
"CopyAndDownvote": {
|
||||
"message": "복사 및 반대"
|
||||
},
|
||||
"ContinueVoting": {
|
||||
"message": "계속 투표"
|
||||
},
|
||||
"ChangeCategoryTooltip": {
|
||||
"message": "당신의 구간에 즉시 적용될 것입니다"
|
||||
},
|
||||
"SponsorTimeEditScrollNewFeature": {
|
||||
"message": "편집 상자 위에 커서를 올린 채 스크롤하면 시간을 빠르게 조정할 수 있습니다. Ctrl이나 Shift 키를 누른 채로 스크롤하면 세밀한 조정이 가능합니다."
|
||||
}
|
||||
|
||||
@@ -182,6 +182,9 @@
|
||||
"hideButtonsDescription": {
|
||||
"message": "Ta opcja ukrywa przyciski do zamieszczania segmentów pojawiające się na odtwarzaczu YouTube."
|
||||
},
|
||||
"showSkipButton": {
|
||||
"message": "Kontynuuj wyświetlanie przycisku pomijania"
|
||||
},
|
||||
"showInfoButton": {
|
||||
"message": "Pokaż przycisk informacyjny na odtwarzaczu YouTube"
|
||||
},
|
||||
@@ -696,6 +699,9 @@
|
||||
"downvoteDescription": {
|
||||
"message": "Niepoprawne/Zły czas"
|
||||
},
|
||||
"incorrectCategory": {
|
||||
"message": "Zmień kategorię"
|
||||
},
|
||||
"nonMusicCategoryOnMusic": {
|
||||
"message": "Ten film jest skategoryzowany jako muzyka. Czy masz pewność, że jest tutaj sponsor? Jeśli w rzeczywistości jest to „Sekcja Niemuzyczna”, otwórz opcje rozszerzenia i włącz tę kategorię. Wtedy będziesz w stanie zamieścić ten segment jako „Bez Muzyki” zamiast sponsora. Przeczytaj proszę wytyczne, jeśli masz wątpliwości."
|
||||
},
|
||||
@@ -804,5 +810,23 @@
|
||||
},
|
||||
"LearnMore": {
|
||||
"message": "Dowiedz się więcej"
|
||||
},
|
||||
"CopyDownvoteButtonInfo": {
|
||||
"message": "Minusuje i tworzy lokalną kopię, abyś mógł przesłać poprawioną wersję"
|
||||
},
|
||||
"OpenCategoryWikiPage": {
|
||||
"message": "Otwórz stronę wiki dla tej kategorii."
|
||||
},
|
||||
"CopyAndDownvote": {
|
||||
"message": "Skopiuj i zminusuj"
|
||||
},
|
||||
"ContinueVoting": {
|
||||
"message": "Kontynuuj głosowanie"
|
||||
},
|
||||
"ChangeCategoryTooltip": {
|
||||
"message": "To natychmiastowo zostanie zastosowane do twoich segmentów"
|
||||
},
|
||||
"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."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -825,5 +825,8 @@
|
||||
},
|
||||
"ChangeCategoryTooltip": {
|
||||
"message": "Isto irá aplicar instantaneamente seus segmentos"
|
||||
},
|
||||
"SponsorTimeEditScrollNewFeature": {
|
||||
"message": "Use a roda do mouse enquanto mantêm o cursor sobre a caixa de edição para ajustar o tempo rapidamente. Combinações das teclas ctrl e shift podem ser usadas para refinar as mudanças."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -699,6 +699,9 @@
|
||||
"downvoteDescription": {
|
||||
"message": "Nesprávne/Zlé načasovanie"
|
||||
},
|
||||
"incorrectCategory": {
|
||||
"message": "Zmeniť kategóriu"
|
||||
},
|
||||
"nonMusicCategoryOnMusic": {
|
||||
"message": "Toto video je kategorizované ako hudobné. Ste si istý, že obsahuje sponzora? Ak sa skutočne jedná o časť bez hudby, otvorte možnosti rozšírenia a povoľte túto kategóriu. Potom môžete tento segment uložiť ako kategóriu \"Bez hudby\" namiesto sponzora. Ak si neviete rady, tak si prosím prečítajte pravidlá."
|
||||
},
|
||||
@@ -808,6 +811,21 @@
|
||||
"LearnMore": {
|
||||
"message": "Zistiť viac"
|
||||
},
|
||||
"CopyDownvoteButtonInfo": {
|
||||
"message": "Dá palec dole a vytvorí kópiu, aby ste mohli segment znova odoslať"
|
||||
},
|
||||
"OpenCategoryWikiPage": {
|
||||
"message": "Otvoriť wiki stránku tejto kategórie."
|
||||
},
|
||||
"CopyAndDownvote": {
|
||||
"message": "Skopírovať a dať palec dole"
|
||||
},
|
||||
"ContinueVoting": {
|
||||
"message": "Pokračovať v hodnotení"
|
||||
},
|
||||
"ChangeCategoryTooltip": {
|
||||
"message": "Týmto ihneď vykonáte zmeny v segmentoch"
|
||||
},
|
||||
"SponsorTimeEditScrollNewFeature": {
|
||||
"message": "Čas môžete rýchlo zmeniť kolieskom myši, ak je kurozor nad zadávacím políčkom. Pre jemné zmeny pritom držte kláves ctrl alebo shift."
|
||||
}
|
||||
|
||||
@@ -811,6 +811,21 @@
|
||||
"LearnMore": {
|
||||
"message": "Дізнатися більше"
|
||||
},
|
||||
"CopyDownvoteButtonInfo": {
|
||||
"message": "Голосує проти та створює локальну копію для повторного надсилання"
|
||||
},
|
||||
"OpenCategoryWikiPage": {
|
||||
"message": "Відкрити вікі-сторінку цієї категорії."
|
||||
},
|
||||
"CopyAndDownvote": {
|
||||
"message": "Скопіювати та проголосувати проти"
|
||||
},
|
||||
"ContinueVoting": {
|
||||
"message": "Продовжити голосування"
|
||||
},
|
||||
"ChangeCategoryTooltip": {
|
||||
"message": "Це миттєво буде застосовано до ваших сегментів"
|
||||
},
|
||||
"SponsorTimeEditScrollNewFeature": {
|
||||
"message": "Навівши курсор на поле редагування, користуйтеся колесом прокрутки, щоб швидко відрегулювати час. Комбінації клавіш ctrl або shift можуть бути використані для точнішої настройки змін."
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#previewbar {
|
||||
overflow: visible;
|
||||
padding: 0;
|
||||
@@ -294,6 +298,10 @@ div:hover > .sponsorBlockChapterBar {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sponsorSkipNoticeCloseButton.biggerCloseButton {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.sponsorSkipMessage {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
@@ -302,6 +310,7 @@ div:hover > .sponsorBlockChapterBar {
|
||||
margin-top: auto;
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
margin-bottom: auto;
|
||||
}
|
||||
|
||||
.sponsorSkipInfo {
|
||||
@@ -530,12 +539,35 @@ input::-webkit-inner-spin-button {
|
||||
.skipButtonControlBarContainer {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.skipButtonControlBarContainer.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.skipButtonControlBarContainer.mobile {
|
||||
bottom: 30%;
|
||||
margin-left: 5px;
|
||||
position: absolute;
|
||||
height: 20px;
|
||||
|
||||
background-color: #00000030;
|
||||
opacity: 0.5;
|
||||
border-radius: 10px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.skipButtonControlBarContainer.mobile.textDisabled {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.skipButtonControlBarContainer.mobile > div {
|
||||
margin: auto;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
#sbSkipIconControlBarImage {
|
||||
height: 60%;
|
||||
top: 0px;
|
||||
@@ -544,6 +576,11 @@ input::-webkit-inner-spin-button {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.mobile #sbSkipIconControlBarImage {
|
||||
height: 100%;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.sponsorBlockTooltip {
|
||||
position: absolute;
|
||||
background-color: rgba(28, 28, 28, 0.7);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<title> SponsorBlock </title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<link href="styles.css" rel="stylesheet"/>
|
||||
|
||||
@@ -39,7 +40,7 @@
|
||||
__MSG_helpPageFeatureDisclaimer__
|
||||
</p>
|
||||
|
||||
<iframe src="../options/options.html#embed" width="100%" height="500px" style="border: none"></iframe>
|
||||
<iframe class="optionsFrame" src="../options/options.html#embed" style="border: none"></iframe>
|
||||
|
||||
<h1>__MSG_helpPageHowSkippingWorks__</h1>
|
||||
|
||||
@@ -56,14 +57,12 @@
|
||||
__MSG_helpPageHowSkippingWorks2__
|
||||
</p>
|
||||
|
||||
<div class="center"><img height="120px" src="images/voting on notice.gif"></div>
|
||||
<div class="center"><img src="images/voting on notice.gif"></div>
|
||||
|
||||
<h1>__MSG_Submitting__</h1>
|
||||
|
||||
<p class="projectPreview">
|
||||
<span class="projectPreviewImageLargeRight">
|
||||
<img src="https://i.imgur.com/A1ilk6x.gif">
|
||||
</span>
|
||||
<img class="projectPreviewImageLarge" src="https://i.imgur.com/A1ilk6x.gif">
|
||||
|
||||
__MSG_helpPageSubmitting1__
|
||||
|
||||
|
||||
@@ -40,14 +40,6 @@ body {
|
||||
transform: translateY(-20%);
|
||||
}
|
||||
|
||||
.projectPreviewImageLargeRight {
|
||||
position: absolute;
|
||||
right: -210px;
|
||||
width: 200px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.createdBy {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
@@ -142,18 +134,9 @@ p,li,code,a {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
@media screen and (orientation:portrait) {
|
||||
p,li,code,a {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.projectPreviewImage {
|
||||
position: unset;
|
||||
width: 130px;
|
||||
display: block;
|
||||
margin: auto;
|
||||
transform: none;
|
||||
}
|
||||
.optionsFrame {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.previewImage {
|
||||
@@ -188,3 +171,32 @@ svg {
|
||||
#sbDonate {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
@media screen and (orientation:portrait) {
|
||||
.projectPreviewImage {
|
||||
position: unset;
|
||||
width: 50%;
|
||||
display: block;
|
||||
margin: auto;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.projectPreviewImageLarge {
|
||||
position: unset;
|
||||
left: 0;
|
||||
width: 50%;
|
||||
display: block;
|
||||
margin: auto;
|
||||
transform: unset;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 100%;
|
||||
margin: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
p,li,code,a {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import * as React from "react";
|
||||
|
||||
import Config from "../config"
|
||||
import * as CompileConfig from "../../config.json";
|
||||
import { Category, CategorySkipOption } from "../types";
|
||||
|
||||
import { getCategoryActionType } from "../utils/categoryUtils";
|
||||
@@ -93,6 +94,10 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
|
||||
<td
|
||||
colSpan={2}>
|
||||
{chrome.i18n.getMessage("category_" + this.props.category + "_description")}
|
||||
{' '}
|
||||
<a href={CompileConfig.wikiLinks[this.props.category]} target="_blank" rel="noreferrer">
|
||||
{`${chrome.i18n.getMessage("LearnMore")}`}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ export interface NoticeProps {
|
||||
|
||||
zIndex?: number,
|
||||
style?: React.CSSProperties
|
||||
biggerCloseButton?: boolean;
|
||||
}
|
||||
|
||||
export interface NoticeState {
|
||||
@@ -151,7 +152,8 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
|
||||
|
||||
{/* Close button */}
|
||||
<img src={chrome.extension.getURL("icons/close.png")}
|
||||
className="sponsorSkipObject sponsorSkipNoticeButton sponsorSkipNoticeCloseButton sponsorSkipNoticeRightButton"
|
||||
className={"sponsorSkipObject sponsorSkipNoticeButton sponsorSkipNoticeCloseButton sponsorSkipNoticeRightButton"
|
||||
+ (this.props.biggerCloseButton ? " biggerCloseButton" : "")}
|
||||
onClick={() => this.close()}>
|
||||
</img>
|
||||
</td>
|
||||
|
||||
@@ -188,6 +188,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
||||
maxCountdownTime={this.state.maxCountdownTime}
|
||||
videoSpeed={() => this.contentContainer().v?.playbackRate}
|
||||
style={noticeStyle}
|
||||
biggerCloseButton={this.contentContainer().onMobileYouTube}
|
||||
ref={this.noticeRef}
|
||||
closeListener={() => this.closeListener()}
|
||||
smaller={this.state.smaller}
|
||||
@@ -350,13 +351,21 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
||||
if (this.state.showSkipButton && (this.segments.length > 1
|
||||
|| getCategoryActionType(this.segments[0].category) !== CategoryActionType.POI
|
||||
|| this.props.unskipTime)) {
|
||||
|
||||
const style: React.CSSProperties = {
|
||||
marginLeft: "4px",
|
||||
color: (this.state.actionState === SkipNoticeAction.Unskip) ? this.selectedColor : this.unselectedColor
|
||||
};
|
||||
if (this.contentContainer().onMobileYouTube) {
|
||||
style.padding = "20px";
|
||||
style.minWidth = "100px";
|
||||
}
|
||||
|
||||
return (
|
||||
<span className="sponsorSkipNoticeUnskipSection">
|
||||
<button id={"sponsorSkipUnskipButton" + this.idSuffix}
|
||||
className="sponsorSkipObject sponsorSkipNoticeButton"
|
||||
style={{marginLeft: "4px",
|
||||
color: (this.state.actionState === SkipNoticeAction.Unskip) ? this.selectedColor : this.unselectedColor
|
||||
}}
|
||||
style={style}
|
||||
onClick={() => this.prepAction(SkipNoticeAction.Unskip)}>
|
||||
{this.state.skipButtonText + (this.state.showKeybindHint ? " (" + Config.config.skipKeybind + ")" : "")}
|
||||
</button>
|
||||
|
||||
@@ -39,6 +39,9 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
|
||||
configUpdateListener: () => void;
|
||||
|
||||
previousSkipType: CategoryActionType;
|
||||
timeBeforeChangingToPOI: number; // Initialized when first selecting POI
|
||||
|
||||
constructor(props: SponsorTimeEditProps) {
|
||||
super(props);
|
||||
|
||||
@@ -47,8 +50,8 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
this.descriptionOptionRef = React.createRef();
|
||||
|
||||
this.idSuffix = this.props.idSuffix;
|
||||
this.previousSkipType = CategoryActionType.Skippable;
|
||||
|
||||
const sponsorTime = this.props.contentContainer().sponsorTimesSubmitting[this.props.index];
|
||||
this.state = {
|
||||
editing: false,
|
||||
sponsorTimeEdits: [null, null],
|
||||
@@ -155,8 +158,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
|
||||
<div id={"sponsorTimesContainer" + this.idSuffix}
|
||||
className="sponsorTimeDisplay"
|
||||
onClick={this.toggleEditTime.bind(this)}
|
||||
onWheel={this.toggleEditTime.bind(this)}>
|
||||
onClick={this.toggleEditTime.bind(this)}>
|
||||
{utils.getFormattedTime(segment[0], true) +
|
||||
((!isNaN(segment[1]) && getCategoryActionType(sponsorTime.category) === CategoryActionType.Skippable)
|
||||
? " " + chrome.i18n.getMessage("to") + " " + utils.getFormattedTime(segment[1], true) : "")}
|
||||
@@ -228,7 +230,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
{(!isNaN(segment[1]) && getCategoryActionType(sponsorTime.category) === CategoryActionType.Skippable) ? (
|
||||
<span id={"sponsorTimePreviewButton" + this.idSuffix}
|
||||
className="sponsorTimeEditButton"
|
||||
onClick={this.previewTime.bind(this)}>
|
||||
onClick={(e) => this.previewTime(e.ctrlKey, e.shiftKey)}>
|
||||
{chrome.i18n.getMessage("preview")}
|
||||
</span>
|
||||
): ""}
|
||||
@@ -292,6 +294,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
|
||||
sponsorTimeEdits[index] = utils.getFormattedTime(timeAsNumber, true);
|
||||
if (getCategoryActionType(sponsorTime.category) === CategoryActionType.POI) sponsorTimeEdits[1] = sponsorTimeEdits[0];
|
||||
|
||||
this.setState({sponsorTimeEdits});
|
||||
this.saveEditTimes();
|
||||
}
|
||||
@@ -305,11 +308,13 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
referenceNode: element.parentElement,
|
||||
prependElement: element,
|
||||
timeout: 15,
|
||||
bottomOffset: 75 + "px",
|
||||
bottomOffset: 0 + "px",
|
||||
leftOffset: -318 + "px",
|
||||
backgroundColor: "rgba(28, 28, 28, 1.0)",
|
||||
htmlId: "sponsorTimesContainer" + this.idSuffix,
|
||||
buttonFunction: () => {Config.config.scrollToEditTimeUpdate = true}
|
||||
buttonFunction: () => { Config.config.scrollToEditTimeUpdate = true },
|
||||
fontSize: "14px",
|
||||
maxHeight: "200px"
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -343,7 +348,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
const chosenCategory = event.target.value as Category;
|
||||
|
||||
// See if show more categories was pressed
|
||||
if (event.target.value !== DEFAULT_CATEGORY && !Config.config.categorySelections.some((category) => category.name === event.target.value)) {
|
||||
if (chosenCategory !== DEFAULT_CATEGORY && !Config.config.categorySelections.some((category) => category.name === chosenCategory)) {
|
||||
event.target.value = DEFAULT_CATEGORY;
|
||||
|
||||
// Alert that they have to enable this category first
|
||||
@@ -357,6 +362,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
}
|
||||
|
||||
if (getCategoryActionType(chosenCategory) === CategoryActionType.POI) {
|
||||
if (this.previousSkipType === CategoryActionType.Skippable) this.timeBeforeChangingToPOI = utils.getFormattedTimeToSeconds(this.state.sponsorTimeEdits[1]);
|
||||
this.setTimeTo(1, null);
|
||||
this.props.contentContainer().updateEditButtonsOnPlayer();
|
||||
|
||||
@@ -364,8 +370,11 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
.some((segment, i) => segment.category === chosenCategory && i !== this.props.index)) {
|
||||
alert(chrome.i18n.getMessage("poiOnlyOneSegment"));
|
||||
}
|
||||
} else if (getCategoryActionType(chosenCategory) === CategoryActionType.Skippable && this.previousSkipType === CategoryActionType.POI) {
|
||||
this.setTimeTo(1, this.timeBeforeChangingToPOI);
|
||||
}
|
||||
|
||||
this.previousSkipType = getCategoryActionType(chosenCategory);
|
||||
this.saveEditTimes();
|
||||
}
|
||||
|
||||
@@ -462,13 +471,17 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
this.props.contentContainer().updatePreviewBar();
|
||||
}
|
||||
|
||||
previewTime(): void {
|
||||
previewTime(ctrlPressed = false, shiftPressed = false): void {
|
||||
const sponsorTimes = this.props.contentContainer().sponsorTimesSubmitting;
|
||||
const index = this.props.index;
|
||||
|
||||
const skipTime = sponsorTimes[index].segment[0];
|
||||
|
||||
this.props.contentContainer().previewTime(skipTime - (2 * this.props.contentContainer().v.playbackRate));
|
||||
let seekTime = 2;
|
||||
if (ctrlPressed) seekTime = 0.5;
|
||||
if (shiftPressed) seekTime = 0.25;
|
||||
|
||||
this.props.contentContainer().previewTime(skipTime - (seekTime * this.props.contentContainer().v.playbackRate));
|
||||
}
|
||||
|
||||
inspectTime(): void {
|
||||
|
||||
@@ -17,6 +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";
|
||||
|
||||
// Hack to get the CSS loaded on permission-based sites (Invidious)
|
||||
utils.wait(() => Config.config !== null, 5000, 10).then(addCSS);
|
||||
@@ -30,7 +31,6 @@ let sponsorVideoID: VideoID = null;
|
||||
// List of open skip notices
|
||||
const skipNotices: SkipNotice[] = [];
|
||||
let activeSkipKeybindElement: ToggleSkippable = null;
|
||||
let lastPOISkip = 0;
|
||||
|
||||
// JSON video info
|
||||
let videoInfo: VideoInfo = null;
|
||||
@@ -151,7 +151,8 @@ function messageListener(request: Message, sender: unknown, sendResponse: (respo
|
||||
//send the sponsor times along with if it's found
|
||||
sendResponse({
|
||||
found: sponsorDataFound,
|
||||
sponsorTimes: sponsorTimes
|
||||
sponsorTimes: sponsorTimes,
|
||||
onMobileYouTube
|
||||
});
|
||||
|
||||
if (!request.updating && popupInitialised && document.getElementById("sponsorBlockPopupContainer") != null) {
|
||||
@@ -191,7 +192,8 @@ function messageListener(request: Message, sender: unknown, sendResponse: (respo
|
||||
case "refreshSegments":
|
||||
sponsorsLookup(sponsorVideoID, false).then(() => sendResponse({
|
||||
found: sponsorDataFound,
|
||||
sponsorTimes: sponsorTimes
|
||||
sponsorTimes: sponsorTimes,
|
||||
onMobileYouTube
|
||||
}));
|
||||
|
||||
return true;
|
||||
@@ -336,6 +338,8 @@ async function videoIDChange(id) {
|
||||
function handleMobileControlsMutations(): void {
|
||||
updateVisibilityOfPlayerControlsButton();
|
||||
|
||||
skipButtonControlBar?.updateMobileControls();
|
||||
|
||||
if (previewBar !== null) {
|
||||
if (document.body.contains(previewBar.container)) {
|
||||
const progressBarBackground = document.querySelector<HTMLElement>(".progress-bar-background");
|
||||
@@ -392,13 +396,6 @@ function createPreviewBar(): void {
|
||||
function durationChangeListener(): void {
|
||||
updateAdFlag();
|
||||
updatePreviewBar();
|
||||
|
||||
if (sponsorTimes) sponsorTimes = sponsorTimes.filter(segmentDurationFilter);
|
||||
}
|
||||
|
||||
function segmentDurationFilter(segment: SponsorTime): boolean {
|
||||
return segment.videoDuration === 0 || !video?.duration
|
||||
|| switchingVideos || Math.abs(video.duration - segment.videoDuration) < 2;
|
||||
}
|
||||
|
||||
function cancelSponsorSchedule(): void {
|
||||
@@ -612,24 +609,6 @@ function setupVideoListeners() {
|
||||
} else {
|
||||
previewBar.updateChapterText(sponsorTimes, video.currentTime);
|
||||
}
|
||||
|
||||
if (!Config.config.dontShowNotice) {
|
||||
const currentPoiSegment = sponsorTimes?.find((segment) =>
|
||||
getCategoryActionType(segment.category) === CategoryActionType.POI &&
|
||||
video.currentTime - segment.segment[0] > 0 &&
|
||||
video.currentTime - segment.segment[0] < previewBar.getMinimumSize(true));
|
||||
if (currentPoiSegment && lastPOISkip < Date.now() - 3000
|
||||
&& !skipNotices.some((notice) => notice.segments.some((s) => s.UUID === currentPoiSegment.UUID))) {
|
||||
lastPOISkip = Date.now();
|
||||
skipToTime({
|
||||
v: video,
|
||||
skipTime: currentPoiSegment.segment,
|
||||
skippingSegments: [currentPoiSegment],
|
||||
openNotice: true,
|
||||
forceAutoSkip: true
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
video.addEventListener('ratechange', () => startSponsorSchedule());
|
||||
// Used by videospeed extension (https://github.com/igrigorik/videospeed/pull/740)
|
||||
@@ -655,7 +634,8 @@ function setupSkipButtonControlBar() {
|
||||
skippingSegments: [segment],
|
||||
openNotice: true,
|
||||
forceAutoSkip: true
|
||||
})
|
||||
}),
|
||||
onMobileYouTube
|
||||
});
|
||||
}
|
||||
|
||||
@@ -681,19 +661,31 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) {
|
||||
categories.push(categorySelection.name);
|
||||
}
|
||||
|
||||
const extraRequestData: Record<string, unknown> = {};
|
||||
const windowHash = window.location.hash.substr(1);
|
||||
if (windowHash) {
|
||||
const params: Record<string, unknown> = windowHash.split('&').reduce((acc, param) => {
|
||||
const [key, value] = param.split('=');
|
||||
acc[key] = value;
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
if (params.requiredSegment) extraRequestData.requiredSegment = params.requiredSegment;
|
||||
}
|
||||
|
||||
// Check for hashPrefix setting
|
||||
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],
|
||||
userAgent: `${chrome.runtime.id}`
|
||||
userAgent: `${chrome.runtime.id}`,
|
||||
...extraRequestData
|
||||
});
|
||||
|
||||
if (response?.ok) {
|
||||
const recievedSegments: SponsorTime[] = JSON.parse(response.responseText)
|
||||
?.filter((video) => video.videoID === id)
|
||||
?.map((video) => video.segments)[0]
|
||||
?.filter(segmentDurationFilter);
|
||||
?.map((video) => video.segments)[0];
|
||||
if (!recievedSegments || !recievedSegments.length) {
|
||||
// return if no video found
|
||||
retryFetch();
|
||||
@@ -1239,6 +1231,7 @@ function skipToTime({v, skipTime, skippingSegments, openNotice, forceAutoSkip, u
|
||||
&& skippingSegments.length === 1
|
||||
&& getCategoryActionType(skippingSegments[0].category) === CategoryActionType.POI) {
|
||||
skipButtonControlBar.enable(skippingSegments[0], !Config.config.highlightCategoryUpdate ? 15 : 0);
|
||||
if (onMobileYouTube) skipButtonControlBar.setShowKeybindHint(false);
|
||||
|
||||
if (!Config.config.highlightCategoryUpdate) {
|
||||
new Tooltip({
|
||||
@@ -1259,6 +1252,7 @@ function skipToTime({v, skipTime, skippingSegments, openNotice, forceAutoSkip, u
|
||||
//send out the message saying that a sponsor message was skipped
|
||||
if (!Config.config.dontShowNotice || !autoSkip) {
|
||||
const newSkipNotice = new SkipNotice(skippingSegments, autoSkip, skipNoticeContentContainer, unskipTime);
|
||||
if (onMobileYouTube) newSkipNotice.setShowKeybindHint(false);
|
||||
skipNotices.push(newSkipNotice);
|
||||
|
||||
activeSkipKeybindElement?.setShowKeybindHint(false);
|
||||
@@ -1346,27 +1340,6 @@ function shouldSkip(segment: SponsorTime): boolean {
|
||||
(Config.config.autoSkipOnMusicVideos && sponsorTimes?.some((s) => s.category === "music_offtopic"));
|
||||
}
|
||||
|
||||
function getControls(): HTMLElement | false {
|
||||
const controlsSelectors = [
|
||||
// YouTube
|
||||
".ytp-right-controls",
|
||||
// Mobile YouTube
|
||||
".player-controls-top",
|
||||
// Invidious/videojs video element's controls element
|
||||
".vjs-control-bar",
|
||||
];
|
||||
|
||||
for (const controlsSelector of controlsSelectors) {
|
||||
const controls = document.querySelectorAll(controlsSelector);
|
||||
|
||||
if (controls && controls.length > 0) {
|
||||
return <HTMLElement> controls[controls.length - 1];
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Creates any missing buttons on the YouTube player if possible. */
|
||||
async function createButtons(): Promise<void> {
|
||||
if (onMobileYouTube) return;
|
||||
@@ -1465,9 +1438,10 @@ function getRealCurrentTime(): number {
|
||||
}
|
||||
|
||||
function startOrEndTimingNewSegment() {
|
||||
const roundedTime = Math.round((getRealCurrentTime() + Number.EPSILON) * 1000) / 1000;
|
||||
if (!isSegmentCreationInProgress()) {
|
||||
sponsorTimesSubmitting.push({
|
||||
segment: [getRealCurrentTime()],
|
||||
segment: [roundedTime],
|
||||
UUID: null,
|
||||
category: Config.config.defaultCategory,
|
||||
actionType: ActionType.Skip,
|
||||
@@ -1477,7 +1451,7 @@ function startOrEndTimingNewSegment() {
|
||||
// Finish creating the new segment
|
||||
const existingSegment = getIncompleteSegment();
|
||||
const existingTime = existingSegment.segment[0];
|
||||
const currentTime = getRealCurrentTime();
|
||||
const currentTime = roundedTime;
|
||||
|
||||
// Swap timestamps if the user put the segment end before the start
|
||||
existingSegment.segment = [Math.min(existingTime, currentTime), Math.max(existingTime, currentTime)];
|
||||
|
||||
@@ -210,7 +210,9 @@ class PreviewBar {
|
||||
bar.style.position = "absolute";
|
||||
const duration = segment[1] - segment[0];
|
||||
if (segment[1] - segment[0] > 0) bar.style.width = `calc(${this.timeToPercentage(segment[1] - segment[0])}${this.chapterFilter(barSegment) ? ' - 2px' : ''})`;
|
||||
bar.style.left = this.timeToPercentage(Math.min(this.videoDuration - Math.max(0, duration), segment[0]));
|
||||
|
||||
const time = segment[1] ? Math.min(this.videoDuration - Math.max(0, duration), segment[0]) : segment[0];
|
||||
bar.style.left = this.timeToPercentage(time);
|
||||
|
||||
return bar;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ const utils = new Utils();
|
||||
|
||||
export interface SkipButtonControlBarProps {
|
||||
skip: (segment: SponsorTime) => void;
|
||||
onMobileYouTube: boolean;
|
||||
}
|
||||
|
||||
export class SkipButtonControlBar {
|
||||
@@ -18,18 +19,31 @@ export class SkipButtonControlBar {
|
||||
segment: SponsorTime;
|
||||
|
||||
showKeybindHint = true;
|
||||
onMobileYouTube: boolean;
|
||||
|
||||
enabled = false;
|
||||
|
||||
timeout: NodeJS.Timeout;
|
||||
duration = 0;
|
||||
|
||||
skip: (segment: SponsorTime) => void;
|
||||
|
||||
// Used if on mobile page
|
||||
hideButton: () => void;
|
||||
showButton: () => void;
|
||||
|
||||
// Used by mobile only for swiping away
|
||||
left = 0;
|
||||
swipeStart = 0;
|
||||
|
||||
constructor(props: SkipButtonControlBarProps) {
|
||||
this.skip = props.skip;
|
||||
this.onMobileYouTube = props.onMobileYouTube;
|
||||
|
||||
this.container = document.createElement("div");
|
||||
this.container.classList.add("skipButtonControlBarContainer");
|
||||
this.container.classList.add("hidden");
|
||||
if (this.onMobileYouTube) this.container.classList.add("mobile");
|
||||
|
||||
this.skipIcon = document.createElement("img");
|
||||
this.skipIcon.src = chrome.runtime.getURL("icons/skipIcon.svg");
|
||||
@@ -43,6 +57,11 @@ export class SkipButtonControlBar {
|
||||
this.container.addEventListener("click", () => this.toggleSkip());
|
||||
this.container.addEventListener("mouseenter", () => this.stopTimer());
|
||||
this.container.addEventListener("mouseleave", () => this.startTimer());
|
||||
if (this.onMobileYouTube) {
|
||||
this.container.addEventListener("touchstart", (e) => this.handleTouchStart(e));
|
||||
this.container.addEventListener("touchmove", (e) => this.handleTouchMove(e));
|
||||
this.container.addEventListener("touchend", () => this.handleTouchEnd());
|
||||
}
|
||||
}
|
||||
|
||||
getElement(): HTMLElement {
|
||||
@@ -50,21 +69,38 @@ export class SkipButtonControlBar {
|
||||
}
|
||||
|
||||
attachToPage(): void {
|
||||
const leftControlsContainer = document.querySelector(".ytp-left-controls");
|
||||
const mountingContainer = this.getMountingContainer();
|
||||
this.chapterText = document.querySelector(".ytp-chapter-container");
|
||||
|
||||
if (leftControlsContainer && !leftControlsContainer.contains(this.container)) {
|
||||
leftControlsContainer.insertBefore(this.container, this.chapterText);
|
||||
|
||||
if (Config.config.autoHideInfoButton) {
|
||||
utils.setupAutoHideAnimation(this.skipIcon, leftControlsContainer, false, false);
|
||||
if (mountingContainer && !mountingContainer.contains(this.container)) {
|
||||
if (this.onMobileYouTube) {
|
||||
mountingContainer.appendChild(this.container);
|
||||
} else {
|
||||
mountingContainer.insertBefore(this.container, this.chapterText);
|
||||
}
|
||||
|
||||
if (Config.config.autoHideInfoButton && !this.onMobileYouTube) {
|
||||
utils.setupAutoHideAnimation(this.skipIcon, mountingContainer, false, false);
|
||||
} else {
|
||||
const { hide, show } = utils.setupCustomHideAnimation(this.skipIcon, mountingContainer, false, false);
|
||||
this.hideButton = hide;
|
||||
this.showButton = show;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private getMountingContainer(): HTMLElement {
|
||||
if (!this.onMobileYouTube) {
|
||||
return document.querySelector(".ytp-left-controls");
|
||||
} else {
|
||||
return document.getElementById("player-container-id");
|
||||
}
|
||||
}
|
||||
|
||||
enable(segment: SponsorTime, duration?: number): void {
|
||||
if (duration) this.duration = duration;
|
||||
this.segment = segment;
|
||||
this.enabled = true;
|
||||
|
||||
this.refreshText();
|
||||
this.textContainer?.classList?.remove("hidden");
|
||||
@@ -103,6 +139,8 @@ export class SkipButtonControlBar {
|
||||
|
||||
this.chapterText?.classList?.remove("hidden");
|
||||
this.getChapterPrefix()?.classList?.remove("hidden");
|
||||
|
||||
this.enabled = false;
|
||||
}
|
||||
|
||||
toggleSkip(): void {
|
||||
@@ -116,12 +154,28 @@ export class SkipButtonControlBar {
|
||||
return;
|
||||
}
|
||||
|
||||
this.container.classList.add("textDisabled");
|
||||
this.textContainer?.classList?.add("hidden");
|
||||
this.chapterText?.classList?.remove("hidden");
|
||||
|
||||
this.getChapterPrefix()?.classList?.add("hidden");
|
||||
|
||||
utils.enableAutoHideAnimation(this.skipIcon);
|
||||
if (this.onMobileYouTube) {
|
||||
this.hideButton();
|
||||
}
|
||||
}
|
||||
|
||||
updateMobileControls(): void {
|
||||
const overlay = document.getElementById("player-control-overlay");
|
||||
|
||||
if (overlay && this.enabled) {
|
||||
if (overlay?.classList?.contains("pointer-events-off")) {
|
||||
this.hideButton();
|
||||
} else {
|
||||
this.showButton();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private getTitle(): string {
|
||||
@@ -131,5 +185,37 @@ export class SkipButtonControlBar {
|
||||
private getChapterPrefix(): HTMLElement {
|
||||
return document.querySelector(".ytp-chapter-title-prefix");
|
||||
}
|
||||
|
||||
// Swiping away on mobile
|
||||
private handleTouchStart(event: TouchEvent): void {
|
||||
this.swipeStart = event.touches[0].clientX;
|
||||
}
|
||||
|
||||
// Swiping away on mobile
|
||||
private handleTouchMove(event: TouchEvent): void {
|
||||
const distanceMoved = this.swipeStart - event.touches[0].clientX;
|
||||
this.left = Math.min(-distanceMoved, 0);
|
||||
|
||||
this.updateLeftStyle();
|
||||
}
|
||||
|
||||
// Swiping away on mobile
|
||||
private handleTouchEnd(): void {
|
||||
if (this.left < -this.container.offsetWidth / 2) {
|
||||
this.disableText();
|
||||
|
||||
// Don't let animation play
|
||||
this.skipIcon.style.display = "none";
|
||||
setTimeout(() => this.skipIcon.style.removeProperty("display"), 200);
|
||||
}
|
||||
|
||||
this.left = 0;
|
||||
this.updateLeftStyle();
|
||||
}
|
||||
|
||||
// Swiping away on mobile
|
||||
private updateLeftStyle() {
|
||||
this.container.style.left = this.left + "px";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,9 +31,10 @@ interface IsInfoFoundMessage {
|
||||
|
||||
export type Message = BaseMessage & (DefaultMessage | BoolValueMessage | IsInfoFoundMessage);
|
||||
|
||||
interface IsInfoFoundMessageResponse {
|
||||
export interface IsInfoFoundMessageResponse {
|
||||
found: boolean;
|
||||
sponsorTimes: SponsorTime[];
|
||||
onMobileYouTube: boolean;
|
||||
}
|
||||
|
||||
interface GetVideoIdResponse {
|
||||
|
||||
@@ -2,7 +2,7 @@ import Config from "./config";
|
||||
|
||||
import Utils from "./utils";
|
||||
import { SponsorTime, SponsorHideType, CategoryActionType } from "./types";
|
||||
import { Message, MessageResponse } from "./messageTypes";
|
||||
import { Message, MessageResponse, IsInfoFoundMessageResponse } from "./messageTypes";
|
||||
import { showDonationLink } from "./utils/configUtils";
|
||||
import { getCategoryActionType } from "./utils/categoryUtils";
|
||||
const utils = new Utils();
|
||||
@@ -278,7 +278,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
||||
}, (tabs) => onTabs(tabs, updating));
|
||||
}
|
||||
|
||||
function infoFound(request: { found: boolean, sponsorTimes: SponsorTime[] }) {
|
||||
function infoFound(request: IsInfoFoundMessageResponse) {
|
||||
if (chrome.runtime.lastError) {
|
||||
//This page doesn't have the injected content script, or at least not yet
|
||||
displayNoVideo();
|
||||
@@ -289,6 +289,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
||||
if (request != undefined) {
|
||||
//remove loading text
|
||||
PageElements.mainControls.style.display = "flex";
|
||||
if (request.onMobileYouTube) PageElements.mainControls.classList.add("hidden");
|
||||
PageElements.whitelistButton.classList.remove("hidden");
|
||||
PageElements.loadingIndicator.style.display = "none";
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ export interface RectangleTooltipProps {
|
||||
maxHeight?: string,
|
||||
maxWidth?: string,
|
||||
backgroundColor?: string,
|
||||
fontSize?: string,
|
||||
buttonFunction?: () => void;
|
||||
}
|
||||
|
||||
@@ -29,6 +30,7 @@ export class RectangleTooltip {
|
||||
props.maxWidth ??= "300px";
|
||||
props.backgroundColor ??= "rgba(28, 28, 28, 0.7)";
|
||||
this.text = props.text;
|
||||
props.fontSize ??= "10px";
|
||||
|
||||
this.container = document.createElement('div');
|
||||
props.htmlId ??= props.text;
|
||||
@@ -51,7 +53,8 @@ export class RectangleTooltip {
|
||||
left: props.leftOffset,
|
||||
maxHeight: props.maxHeight,
|
||||
maxWidth: props.maxWidth,
|
||||
backgroundColor: props.backgroundColor}}
|
||||
backgroundColor: props.backgroundColor,
|
||||
fontSize: props.fontSize}}
|
||||
className="sponsorBlockRectangleTooltip" >
|
||||
<div>
|
||||
<img className="sponsorSkipLogo sponsorSkipObject"
|
||||
|
||||
26
src/utils.ts
26
src/utils.ts
@@ -183,7 +183,7 @@ export default class Utils {
|
||||
}
|
||||
}
|
||||
|
||||
setupAutoHideAnimation(element: Element, container: Element, enabled = true, rightSlide = true): void {
|
||||
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");
|
||||
@@ -191,7 +191,14 @@ export default class Utils {
|
||||
|
||||
let mouseEntered = false;
|
||||
|
||||
container.addEventListener("mouseenter", () => {
|
||||
return {
|
||||
hide: () => {
|
||||
mouseEntered = false;
|
||||
if (element.classList.contains("autoHiding")) {
|
||||
element.classList.add("hidden");
|
||||
}
|
||||
},
|
||||
show: () => {
|
||||
mouseEntered = true;
|
||||
element.classList.remove("animationDone");
|
||||
|
||||
@@ -199,14 +206,15 @@ export default class Utils {
|
||||
setTimeout(() => {
|
||||
if (mouseEntered) element.classList.remove("hidden")
|
||||
}, 10);
|
||||
});
|
||||
|
||||
container.addEventListener("mouseleave", () => {
|
||||
mouseEntered = false;
|
||||
if (element.classList.contains("autoHiding")) {
|
||||
element.classList.add("hidden");
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
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 {
|
||||
|
||||
20
src/utils/pageUtils.ts
Normal file
20
src/utils/pageUtils.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export function getControls(): HTMLElement | false {
|
||||
const controlsSelectors = [
|
||||
// YouTube
|
||||
".ytp-right-controls",
|
||||
// Mobile YouTube
|
||||
".player-controls-top",
|
||||
// Invidious/videojs video element's controls element
|
||||
".vjs-control-bar",
|
||||
];
|
||||
|
||||
for (const controlsSelector of controlsSelectors) {
|
||||
const controls = document.querySelectorAll(controlsSelector);
|
||||
|
||||
if (controls && controls.length > 0) {
|
||||
return <HTMLElement> controls[controls.length - 1];
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user