Compare commits

..

18 Commits
3.3.1 ... 3.3.3

Author SHA1 Message Date
Ajay Ramachandran
f35afaf6bc bump version 2021-10-06 21:10:31 -04:00
Ajay Ramachandran
85b1b51b76 Merge branch 'master' of https://github.com/ajayyy/SponsorBlock 2021-10-06 21:02:02 -04:00
Ajay Ramachandran
9dc5449e37 Make capitalization consistent 2021-10-06 21:01:59 -04:00
Ajay Ramachandran
7baac9dcbf New Crowdin updates (#984) 2021-10-05 20:52:16 -04:00
Ajay Ramachandran
4045978b54 Support older browsers 2021-10-05 20:51:20 -04:00
Ajay Ramachandran
56bc3fca04 Hide skip to highlight right away when dismissing 2021-10-05 20:06:18 -04:00
Ajay Ramachandran
bfa31429f1 Support shorts with additional parts of url 2021-10-03 13:08:50 -04:00
Ajay Ramachandran
66f0cc8883 Support shorts 2021-10-03 13:07:47 -04:00
Ajay Ramachandran
1a0ac27e49 New Crowdin updates (#980) 2021-10-02 18:05:41 -04:00
Ajay Ramachandran
7b87ae7b08 bump version 2021-10-02 18:00:58 -04:00
Ajay Ramachandran
9ab8e63b1d Merge pull request #983 from ajayyy/test-action
Add testing action
2021-10-02 18:00:09 -04:00
Ajay Ramachandran
0e147134f3 Add testing action 2021-10-02 17:42:47 -04:00
Ajay Ramachandran
8605e23fbb Fix starting segments when there is a t=? in the url 2021-10-02 17:13:30 -04:00
Ajay Ramachandran
5f34a777f1 Fix starting segment sometimes not being skipped and duration filter 2021-10-02 16:15:53 -04:00
Ajay Ramachandran
1f43d07e16 Remove possible error in notice 2021-10-02 16:05:23 -04:00
Ajay Ramachandran
a88aaf4590 Prevent error when video not loaded yet 2021-10-02 15:46:33 -04:00
Ajay Ramachandran
25f78ed55b Merge branch 'master' of https://github.com/ajayyy/SponsorBlock 2021-10-02 15:24:01 -04:00
Ajay Ramachandran
26e73c515c Fix seeking issues with poi segment 2021-10-02 15:23:59 -04:00
44 changed files with 2242 additions and 484 deletions

View File

@@ -12,7 +12,9 @@ jobs:
# Initialization
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm install
with:
node-version: '16'
- run: npm ci
- name: Copy configuration
run: cp config.json.example config.json

View File

@@ -14,7 +14,9 @@ jobs:
# Initialization
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm install
with:
node-version: '16'
- run: npm ci
- name: Copy configuration
run: cp config.json.example config.json

20
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Tests
on: [push, pull_request]
jobs:
build:
name: Run tests
runs-on: ubuntu-latest
steps:
# Initialization
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: npm ci
- name: Run tests
run: npm run test-without-building

View File

@@ -60,6 +60,8 @@ You can read the API docs [here](https://wiki.sponsor.ajay.app/index.php/API_Doc
# Building
You must have Node.js 16 installed.
Rename `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.

View File

@@ -1,7 +1,7 @@
{
"name": "__MSG_fullName__",
"short_name": "SponsorBlock",
"version": "3.3.1",
"version": "3.3.3",
"default_locale": "en",
"description": "__MSG_Description__",
"homepage_url": "https://sponsor.ajay.app",

2234
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -182,15 +182,15 @@
"hideButtonsDescription": {
"message": "Това скрива бутоните, които се показват в плейъра на YouTube за изпращане на сегменти за пропускане."
},
"showSkipButton": {
"message": "Оставяне в плейъра на бутона за преминаване към акцента"
},
"showInfoButton": {
"message": "Показване на бутона за информация в плейъра на YouTube"
},
"hideInfoButton": {
"message": "Скриване на бутона за информация в плейъра на YouTube"
},
"whatInfoButton": {
"message": "Това е бутонът, който отваря изскачащ прозорец в страницата на YouTube."
},
"autoHideInfoButton": {
"message": "Автоматично скриване на бутона за информация"
},
@@ -200,9 +200,6 @@
"showDeleteButton": {
"message": "Показване на бутона за изтриване в плейъра на YouTube"
},
"whatDeleteButton": {
"message": "Това е бутонът в плейъра на YouTube, който ще изчисти всичките ви неизпратени сегменти за текущия видеоклип."
},
"enableViewTracking": {
"message": "Активиране проследяването на броя пропускания"
},
@@ -442,9 +439,6 @@
"showUploadButton": {
"message": "Показване на бутона за качване"
},
"whatUploadButton": {
"message": "Този бутон се появява в плейъра на YouTube, след като сте избрали времева отметка и сте готови за изпращане."
},
"customServerAddress": {
"message": "Адрес на сървъра на SponsorBlock"
},

View File

@@ -182,15 +182,15 @@
"hideButtonsDescription": {
"message": "Skryje tlačítka, která se zobrazí v YouTube přehrávači pro přeskočení segmentů."
},
"showSkipButton": {
"message": "Nechat tlačítko přeskočení na zvýraznění v přehrávači"
},
"showInfoButton": {
"message": "Zobrazit informační tlačítko v YouTube přehrávači"
},
"hideInfoButton": {
"message": "Skrýt informační tlačítko v YouTube přehrávači"
},
"whatInfoButton": {
"message": "Toto je tlačítko, které otevře vyskakovací nabídku na YouTube stránce."
},
"autoHideInfoButton": {
"message": "Automaticky skrýt informační tlačítko"
},
@@ -200,9 +200,6 @@
"showDeleteButton": {
"message": "Zobrazit tlačítko Odstranit v YouTube přehrávači"
},
"whatDeleteButton": {
"message": "Toto je tlačítko v YouTube přehrávači, které odebere všechny vaše neodeslané segmenty v současném videu."
},
"enableViewTracking": {
"message": "Povolit počítadlo přeskočení"
},
@@ -442,9 +439,6 @@
"showUploadButton": {
"message": "Zobrazit tlačítko Nahrát"
},
"whatUploadButton": {
"message": "Toto tlačítko se objeví v YouTube přehrávači po vybrání časového razítka a po připravení k odeslání."
},
"customServerAddress": {
"message": "Adresa serveru SponsorBlock"
},

View File

@@ -182,15 +182,15 @@
"hideButtonsDescription": {
"message": "Versteckt die Schaltflächen im YouTube-Videoplayer, um Segmente einzusenden."
},
"showSkipButton": {
"message": "Behalte \"Zum Highlight springen\"-Knopf in der Navigationsleiste"
},
"showInfoButton": {
"message": "Zeige Info-Knopf im Youtube-Videoplayer"
},
"hideInfoButton": {
"message": "Deaktiviere Info-Knopf im Youtube-Videoplayer"
},
"whatInfoButton": {
"message": "Dieser Knopf öffnet ein Pop-up auf der Youtube-Seite."
},
"autoHideInfoButton": {
"message": "Info-Button automatisch ausblenden"
},
@@ -200,9 +200,6 @@
"showDeleteButton": {
"message": "Zeige den Löschen-Knopf im Youtube-Videoplayer"
},
"whatDeleteButton": {
"message": "Dieser Knopf im YouTube-Videoplayer löscht alle nicht übermittelten Segmente für das aktuelle Video."
},
"enableViewTracking": {
"message": "Aktiviere das Zählen übersprungener Segmente"
},
@@ -442,9 +439,6 @@
"showUploadButton": {
"message": "Upload-Knopf anzeigen"
},
"whatUploadButton": {
"message": "Dieser Knopf erscheint im YouTube-Videoplayer, nachdem du ein Videosegment markiert hast und dazu bereit bist, es zu übermitteln."
},
"customServerAddress": {
"message": "SponsorBlock Serveradresse"
},

View File

@@ -183,7 +183,7 @@
"message": "This hides the buttons that appear on the YouTube player to submit skip segments."
},
"showSkipButton": {
"message": "Keep Skip to Highlight Button on Player"
"message": "Keep Skip To Highlight Button On Player"
},
"showInfoButton": {
"message": "Show Info Button On YouTube Player"

View File

@@ -182,15 +182,15 @@
"hideButtonsDescription": {
"message": "Esto oculta los botones que aparecen en el reproductor de YouTube que se usan para enviar segmentos saltados."
},
"showSkipButton": {
"message": "Mantener el Botón de \"Saltar a Destacado\" en el Reproductor"
},
"showInfoButton": {
"message": "Mostrar botón de información en el reproductor de YouTube"
},
"hideInfoButton": {
"message": "Ocultar botón de información en el reproductor de YouTube"
},
"whatInfoButton": {
"message": "Este es el botón que abre una ventana en la página de YouTube."
},
"autoHideInfoButton": {
"message": "Ocular automáticamente el Botón de Información"
},
@@ -200,9 +200,6 @@
"showDeleteButton": {
"message": "Mostrar botón de eliminar en el reproductor de YouTube"
},
"whatDeleteButton": {
"message": "Este es el botón en el reproductor de YouTube que eliminará todos tus segmentos no enviados para el vídeo actual."
},
"enableViewTracking": {
"message": "Habilitar el conteo de omisiones"
},
@@ -442,9 +439,6 @@
"showUploadButton": {
"message": "Mostrar botón de subida"
},
"whatUploadButton": {
"message": "Este botón aparece en el reproductor de YouTube después de que has seleccionado una marca de tiempo y estas listo para enviar."
},
"customServerAddress": {
"message": "Dirección del servidor SponsorBlock"
},

View File

@@ -182,15 +182,15 @@
"hideButtonsDescription": {
"message": "See peidab nupud, mis kuvatakse YouTube'i mängijal vahelejätmiste segmentide saatmiseks."
},
"showSkipButton": {
"message": "Hoia esiletõstuni vahelejätmise nuppu mängijal"
},
"showInfoButton": {
"message": "Kuva YouTube'i mängijal infonupp"
},
"hideInfoButton": {
"message": "Peida YouTube'i mängijal infonupp"
},
"whatInfoButton": {
"message": "See on see nupp, mis avab YouTube'i lehel hüpiku."
},
"autoHideInfoButton": {
"message": "Peida infonupp automaatselt"
},
@@ -200,9 +200,6 @@
"showDeleteButton": {
"message": "Kuva YouTube'i mängijal kustutusnupp"
},
"whatDeleteButton": {
"message": "YouTube'i mängija nupp, mis tühjendab kõik sinu praeguse video saatmata segmendid."
},
"enableViewTracking": {
"message": "Luba vahelejätmiste arvu jälgimine"
},
@@ -442,9 +439,6 @@
"showUploadButton": {
"message": "Kuva üleslaadimisnupp"
},
"whatUploadButton": {
"message": "See nupp kuvatakse YouTube'i mängijal, kui oled ajatempli ära valinud ning saatmiseks valmis."
},
"customServerAddress": {
"message": "SponsorBlocki serveri aadress"
},

View File

@@ -182,6 +182,9 @@
"message": "کار شما",
"description": "Used to describe the section that will show you the statistics from your submissions."
},
"502": {
"message": "به نظر می‌رسد سرور زیر فشار است. چند ثانیه‌ی دیگر دوباره امتحان کنید."
},
"errorCode": {
"message": "کد خطا: "
},
@@ -191,6 +194,12 @@
"mute": {
"message": "بی‌صدا"
},
"minLower": {
"message": "دقیقه"
},
"hourLower": {
"message": "ساعت"
},
"createdBy": {
"message": "ایجاد شده توسط"
},

View File

@@ -182,15 +182,15 @@
"hideButtonsDescription": {
"message": "Tämä piilottaa YouTuben soittimessa näkyvät, ohitettavien aikojen lähettämiseen käytetyt painikkeet."
},
"showSkipButton": {
"message": "Pidä \"Ohita kohtaan: Kohokohta\" -painike soittimessa"
},
"showInfoButton": {
"message": "Näytä info-painike YouTuben soittimessa"
},
"hideInfoButton": {
"message": "Piilota info-painike YouTuben soittimessa"
},
"whatInfoButton": {
"message": "Tämä on painike, joka avaa ponnahdusikkunan YouTube-sivulla."
},
"autoHideInfoButton": {
"message": "Piilota info-painike automaattisesti"
},
@@ -200,9 +200,6 @@
"showDeleteButton": {
"message": "Näytä poista-painike YouTuben soittimessa"
},
"whatDeleteButton": {
"message": "Tämä on YouTuben soittimen painike, joka poistaa kaikki kyseisen videon sponsorointikohdat, joita et ole vielä lähettänyt."
},
"enableViewTracking": {
"message": "Ota ohitusten lukumäärän seuranta käyttöön"
},
@@ -442,9 +439,6 @@
"showUploadButton": {
"message": "Näytä lähetä-painike"
},
"whatUploadButton": {
"message": "Tämä painike ilmestyy YouTube-soittimeen, kun olet valinnut aikaleiman ja olet valmis lähettämään sen."
},
"customServerAddress": {
"message": "SponsorBlock-palvelimen osoite"
},

View File

@@ -188,9 +188,6 @@
"hideInfoButton": {
"message": "Cacher le bouton Info sur le lecteur YouTube"
},
"whatInfoButton": {
"message": "Il s'agit du bouton qui ouvre l'encart sur la page YouTube."
},
"autoHideInfoButton": {
"message": "Masquer Automatiquement Le Button Info"
},
@@ -200,9 +197,6 @@
"showDeleteButton": {
"message": "Montrer le bouton Supprimer sur le lecteur YouTube"
},
"whatDeleteButton": {
"message": "Il s'agit du bouton qui permet de supprimer tous les segments commerciaux depuis le lecteur YouTube."
},
"enableViewTracking": {
"message": "Activer le suivi du nombre de sauts de segments"
},
@@ -442,9 +436,6 @@
"showUploadButton": {
"message": "Afficher le bouton de téléchargement"
},
"whatUploadButton": {
"message": "Ce bouton apparaît sur le lecteur YouTube dès qu'un segment est prêt à être envoyé."
},
"customServerAddress": {
"message": "Adresse du serveur SponsorBlock"
},

View File

@@ -182,9 +182,6 @@
"hideInfoButton": {
"message": "Info gomb elrejtése a YouTube lejátszón"
},
"whatInfoButton": {
"message": "Ez a gomb felhoz egy felugró dobozt a YouTube oldalon."
},
"autoHideInfoButton": {
"message": "Automatikus elrejtése az Információ Gombnak"
},
@@ -194,9 +191,6 @@
"showDeleteButton": {
"message": "Törlés gomb mutatása a YouTube lejátszón"
},
"whatDeleteButton": {
"message": "Ez egy gomb a lejátszón, ami törli az összes beküldetlen szegmensét a jelenlegi videón."
},
"enableViewTracking": {
"message": "Átugrás-számláló követés bekapcsolása"
},
@@ -371,9 +365,6 @@
"showUploadButton": {
"message": "Feltöltés gomb megjelenítése"
},
"whatUploadButton": {
"message": "Ez a gomb a YouTube lejátszón jelenik meg, miután kiválasztott egy időtartamot és készen áll a beküldésre."
},
"customServerAddress": {
"message": "SponsorBlock szerver címe"
},

View File

@@ -52,6 +52,9 @@
"reskip": {
"message": "Lewati Ulang"
},
"unmute": {
"message": "Bunyikan"
},
"paused": {
"message": "Dijeda"
},
@@ -85,6 +88,9 @@
"noVideoID": {
"message": "Video YouTube tidak ditemukan.\nJika terjadi kesalahan, segarkan halaman."
},
"refreshSegments": {
"message": "Segarkan segmen"
},
"success": {
"message": "Sukses!"
},
@@ -155,6 +161,9 @@
"setUsername": {
"message": "Atur Nama Pengguna"
},
"copyPublicID": {
"message": "Salin UserID Publik"
},
"discordAdvert": {
"message": "Gabung dengan server resmi discord untuk memberikan kritik dan saran!"
},
@@ -179,8 +188,8 @@
"hideInfoButton": {
"message": "Sembunyikan Tombol Info Di Pemutar Video YouTube"
},
"whatInfoButton": {
"message": "Ini adalah tombol yang membuka popup di halaman YouTube."
"autoHideInfoButton": {
"message": "Otomatis Sembunyikan Tombol Info"
},
"hideDeleteButton": {
"message": "Sembunyikan Tombol Hapus Di Pemutar Video YouTube"
@@ -188,9 +197,6 @@
"showDeleteButton": {
"message": "Tampilkan Tombol Hapus Di Pemutar Video YouTube"
},
"whatDeleteButton": {
"message": "Ini adalah tombol di pemutar YouTube yang akan menghapus semua segmen yang belum dikirim pada video."
},
"enableViewTracking": {
"message": "Aktifkan Pelacakan Jumlah Lewati"
},
@@ -275,9 +281,15 @@
"skip": {
"message": "Lewati"
},
"mute": {
"message": "Bisukan"
},
"skip_category": {
"message": "Lewati {0}?"
},
"mute_category": {
"message": "Bisukan {0}?"
},
"skip_to_category": {
"message": "Lompat ke {0}?",
"description": "Used for skipping to things (Skip to Highlight)"
@@ -286,6 +298,10 @@
"message": "{0} dilewati",
"description": "Example: Sponsor Skipped"
},
"muted": {
"message": "{0} Dibisukan",
"description": "Example: Sponsor Muted"
},
"skipped_to_category": {
"message": "Melewati ke {0}",
"description": "Used for skipping to things (Skipped to Highlight)"
@@ -338,6 +354,9 @@
"changeUserID": {
"message": "Impor/Ekspor UserID"
},
"whatChangeUserID": {
"message": "Ini harus dirahasiakan. Ini seperti kata sandi dan tidak boleh dibagikan kepada siapa pun. Jika seseorang mempunyai ini, mereka bisa menyamar jadi anda. Jika anda mencari UserID publik anda, klik ikon papan tulis di popup."
},
"setUserID": {
"message": "Atur UserID"
},
@@ -353,9 +372,19 @@
"supportOtherSites": {
"message": "Dukung Situs Youtube Pihak Ketiga"
},
"supportOtherSitesDescription": {
"message": "Dukung klien YouTube pihak ketiga. Untuk mengaktifkan dukungan, anda harus menerima izin tambahan. Ini tidak akan bekerja di Mode Samaran di Chrome dan varian Chromium lainnya.",
"description": "This replaces the 'supports Invidious' option because it now works on other YouTube sites such as Cloudtube"
},
"supportedSites": {
"message": "Situs yang didukung: "
},
"optionsInfo": {
"message": "Aktifkan dukungan Invidious, nonaktifkan lewati otomatis, tombol sembunyi dan lainnya."
},
"addInvidiousInstance": {
"message": "Tambah Instance Klien Pihak Ketiga"
},
"add": {
"message": "Tambah"
},
@@ -383,9 +412,6 @@
"showUploadButton": {
"message": "Tampilkan Tombol Unggah"
},
"whatUploadButton": {
"message": "Tombol ini muncul di pemutar video YouTube setelah anda memilih stempel waktu dan siap untuk dikirimkan."
},
"customServerAddress": {
"message": "Alamat Server SponsorBlock"
},

View File

@@ -188,9 +188,6 @@
"hideInfoButton": {
"message": "Nascondi il pulsante d'informazioni sopra al video"
},
"whatInfoButton": {
"message": "Questo è il pulsante che apre un popup nella pagina YouTube."
},
"autoHideInfoButton": {
"message": "Nascondi in automatico il Pulsante di Informazioni"
},
@@ -200,9 +197,6 @@
"showDeleteButton": {
"message": "Mostra il pulsante elimina"
},
"whatDeleteButton": {
"message": "Questo è il pulsante che ti permette di cancellare tutti i segmenti non inviati del video attuale."
},
"enableViewTracking": {
"message": "Attiva il conteggio dei salti"
},
@@ -442,9 +436,6 @@
"showUploadButton": {
"message": "Mostra Pulsante di Caricamento"
},
"whatUploadButton": {
"message": "Questo pulsante appare sul riproduttore di YouTube dopo che hai selezionato un marcatore temporale e sei pronto ad inviarlo."
},
"customServerAddress": {
"message": "Indirizzo Server SponsorBlock"
},

View File

@@ -182,9 +182,6 @@
"hideInfoButton": {
"message": "YouTubeプレーヤーの情報ボタンを隠す"
},
"whatInfoButton": {
"message": "これはYouTubeのページ上でポップアップを開くためのボタンです。"
},
"autoHideInfoButton": {
"message": "情報ボタンを自動的に隠す"
},
@@ -194,9 +191,6 @@
"showDeleteButton": {
"message": "YouTubeプレーヤーに削除ボタンを表示"
},
"whatDeleteButton": {
"message": "これはYouTubeプレーヤー上のボタンで、現在の動画から未提出のセグメントを全て消去します。"
},
"enableViewTracking": {
"message": "スキップ回数の統計を有効にする"
},
@@ -423,9 +417,6 @@
"showUploadButton": {
"message": "アップロードボタンを表示"
},
"whatUploadButton": {
"message": "このボタンはタイムスタンプを選択して投稿の準備ができた後にYouTubeプレーヤーに表示されます。"
},
"customServerAddress": {
"message": "SponsorBlock サーバーアドレス"
},

View File

@@ -182,15 +182,15 @@
"hideButtonsDescription": {
"message": "스킵할 구간을 제출하기 위해 YouTube 플레이어에 나타나는 버튼을 숨깁니다"
},
"showSkipButton": {
"message": "플레이어에 하이라이트로 건너뛰기 버튼 표시"
},
"showInfoButton": {
"message": "YouTube 플레이어에서 정보 버튼 표시하기"
},
"hideInfoButton": {
"message": "YouTube 플레이어에서 정보 버튼 숨기기"
},
"whatInfoButton": {
"message": "YouTube 페이지에 팝업으로 표시되는 버튼입니다"
},
"autoHideInfoButton": {
"message": "정보 버튼 자동 숨김"
},
@@ -200,9 +200,6 @@
"showDeleteButton": {
"message": "YouTube 플레이어에서 삭제 버튼 표시하기"
},
"whatDeleteButton": {
"message": "현재 영상에 제출되지 않은 구간을 YouTube 플레이어 내에서 지우는 버튼입니다"
},
"enableViewTracking": {
"message": "스킵 개수 추적 활성화"
},
@@ -442,9 +439,6 @@
"showUploadButton": {
"message": "업로드 버튼 표시"
},
"whatUploadButton": {
"message": "이 버튼은 타임 스탬프를 설정 후 제출 준비가 되었을 때 YouTube 플레이어에 나타납니다."
},
"customServerAddress": {
"message": "SponsorBlock 서버 주소"
},

View File

@@ -176,18 +176,12 @@
"hideInfoButton": {
"message": "YouTube പ്ലെയറിൽ വിവര ബട്ടൺ മറയ്‌ക്കുക"
},
"whatInfoButton": {
"message": "YouTube പേജിൽ ഒരു പോപ്പ്അപ്പ് തുറക്കുന്ന ബട്ടണാണിത്."
},
"hideDeleteButton": {
"message": "YouTube പ്ലെയറിൽ ഇല്ലാതാക്കുക ബട്ടൺ മറയ്‌ക്കുക"
},
"showDeleteButton": {
"message": "YouTube പ്ലെയറിൽ ഇല്ലാതാക്കുക ബട്ടൺ കാണിക്കുക"
},
"whatDeleteButton": {
"message": "നിലവിലെ വീഡിയോയ്‌ക്കായി നിങ്ങൾ സമർപ്പിക്കാത്ത എല്ലാ സെഗ്‌മെന്റുകളും മായ്‌ക്കുന്ന YouTube പ്ലെയറിലെ ബട്ടൺ ഇതാണ്."
},
"enableViewTracking": {
"message": "ക Count ണ്ട് ട്രാക്കിംഗ് ഒഴിവാക്കുക പ്രാപ്തമാക്കുക"
},
@@ -359,9 +353,6 @@
"showUploadButton": {
"message": "അപ്‌ലോഡ് ബട്ടൺ കാണിക്കുക"
},
"whatUploadButton": {
"message": "നിങ്ങൾ ഒരു ടൈംസ്റ്റാമ്പ് തിരഞ്ഞെടുത്ത് സമർപ്പിക്കാൻ തയ്യാറായ ശേഷം ഈ ബട്ടൺ YouTube പ്ലെയറിൽ ദൃശ്യമാകും."
},
"customServerAddress": {
"message": "സ്പോൺസർബ്ലോക്ക് സെർവർ വിലാസം"
},

View File

@@ -176,18 +176,12 @@
"hideInfoButton": {
"message": "Sembunyikan Butang Maklumat Pada Pemain YouTube"
},
"whatInfoButton": {
"message": "Ini adalah butang yang membuka pop timbul di halaman YouTube."
},
"hideDeleteButton": {
"message": "Sembunyikan Butang Padam Pada Pemain YouTube"
},
"showDeleteButton": {
"message": "Tunjukkan Butang Padam Pada Pemain YouTube"
},
"whatDeleteButton": {
"message": "Ini adalah butang pada pemain YouTube yang akan membersihkan semua segmen anda yang belum dihantar untuk video semasa."
},
"enableViewTracking": {
"message": "Dayakan Skip Count Tracking"
},
@@ -359,9 +353,6 @@
"showUploadButton": {
"message": "Tunjukkan Butang Muat Naik"
},
"whatUploadButton": {
"message": "Butang ini muncul di pemain YouTube setelah anda memilih cap waktu dan siap untuk dihantar."
},
"customServerAddress": {
"message": "Alamat Pelayan Sponsorblock"
},

View File

@@ -182,15 +182,15 @@
"hideButtonsDescription": {
"message": "Dit verbergt de knoppen die verschijnen op de YouTube-speler om segmenten over te slaan."
},
"showSkipButton": {
"message": "Knop voor \"overslaan naar hoogtepunt\" op speler houden"
},
"showInfoButton": {
"message": "Info-knop op YouTube-speler weergeven"
},
"hideInfoButton": {
"message": "Info-knop op YouTube-speler verbergen"
},
"whatInfoButton": {
"message": "Dit is de knop die een pop-up opent op de YouTube-pagina."
},
"autoHideInfoButton": {
"message": "Infoknop automatisch verbergen"
},
@@ -200,9 +200,6 @@
"showDeleteButton": {
"message": "Verwijderen-knop op YouTube-speler weergeven"
},
"whatDeleteButton": {
"message": "Dit is de knop op de YouTube-speler die al uw niet-ingediende segmenten van de huidige video zal wissen."
},
"enableViewTracking": {
"message": "Bijhouden van het aantal keren overslaan inschakelen"
},
@@ -442,9 +439,6 @@
"showUploadButton": {
"message": "Uploaden-knop weergeven"
},
"whatUploadButton": {
"message": "Deze knop verschijnt op de YouTube-speler nadat u een tijdstempel heeft geselecteerd en klaar bent om in te dienen."
},
"customServerAddress": {
"message": "SponsorBlock-serveradres"
},

View File

@@ -176,18 +176,12 @@
"hideInfoButton": {
"message": "Skjul infoknappen på YouTube-avspilleren"
},
"whatInfoButton": {
"message": "Dette er knappen som åpner et oppsprett på YouTube-siden."
},
"hideDeleteButton": {
"message": "Skjul Slett-knappen på YouTube-avspilleren"
},
"showDeleteButton": {
"message": "Vis Slett-knappen på YouTube-avspilleren"
},
"whatDeleteButton": {
"message": "Dette er knappen på YouTube-avspilleren som tømmer alle dine uinnsendte segmenter for den nåværende videoen."
},
"enableViewTracking": {
"message": "Skru på telling av hopp"
},
@@ -359,9 +353,6 @@
"showUploadButton": {
"message": "Vis opplastingsknapp"
},
"whatUploadButton": {
"message": "Denne knappen dukker opp på YouTube-avspilleren etter at du har valgt et tidsstempel og er klar til å sende inn."
},
"customServerAddress": {
"message": "SponsorBlock-tjeneradresse"
},

View File

@@ -188,9 +188,6 @@
"hideInfoButton": {
"message": "Ukryj przycisk informacyjny na odtwarzaczu YouTube"
},
"whatInfoButton": {
"message": "Jest to przycisk otwierający okienko pop-up na stronie YouTube."
},
"autoHideInfoButton": {
"message": "Autoukrywanie przycisku informacji"
},
@@ -200,9 +197,6 @@
"showDeleteButton": {
"message": "Pokaż przycisk usuwania na odtwarzaczu YouTube"
},
"whatDeleteButton": {
"message": "Ten przycisk na odtwarzaczu YouTube wyczyści wszystkie twoje niewysłane segmenty dla bieżącego filmu."
},
"enableViewTracking": {
"message": "Włącz monitorowanie liczby pominięć"
},
@@ -442,9 +436,6 @@
"showUploadButton": {
"message": "Pokaż przycisk wysyłania"
},
"whatUploadButton": {
"message": "Ten przycisk pojawia się na odtwarzaczu YouTube po wybraniu przedziału czasowego, gdy segment jest gotowy do wysłania."
},
"customServerAddress": {
"message": "Adres serwera SponsorBlock"
},

View File

@@ -182,15 +182,15 @@
"hideButtonsDescription": {
"message": "Esta opção esconde os botões que aparecem para enviar segmentos no player do YouTube."
},
"showSkipButton": {
"message": "Manter botão Pular para os Destaques no player"
},
"showInfoButton": {
"message": "Mostrar botão de Informações no player do Youtube"
},
"hideInfoButton": {
"message": "Esconder botão de Informações no player do Youtube"
},
"whatInfoButton": {
"message": "Este é o botão que abre o popup na pagina do Youtube."
},
"autoHideInfoButton": {
"message": "Esconder Automaticamente o Botão de Informação"
},
@@ -200,9 +200,6 @@
"showDeleteButton": {
"message": "Mostrar botão de Apagar no player do Youtube"
},
"whatDeleteButton": {
"message": "Este é o botão que lhe permite saltar todos os patrocínios do player do Youtube."
},
"enableViewTracking": {
"message": "Ativar Contador de Segmentos Pulados"
},
@@ -442,9 +439,6 @@
"showUploadButton": {
"message": "Mostrar botão de envio"
},
"whatUploadButton": {
"message": "Este botão aparece no reprodutor do YouTube depois de ter selecionado um carimbo de data/hora e está pronto para ser enviado."
},
"customServerAddress": {
"message": "Endereço do servidor do SponsorBlock"
},
@@ -656,6 +650,9 @@
"message": "Para enviar os segmentos com a categoria de \"{0}\", você deve ativá-la nas opções. Você será redirecionado para as opções agora.",
"description": "Used when submitting segments to only let them select a certain category if they have it enabled in the options."
},
"poiOnlyOneSegment": {
"message": "Aviso: Este tipo de segmento pode ter no máximo um ativo por vez. Enviar múltiplos fará com que um aleatório seja mostrado."
},
"youMustSelectACategory": {
"message": "Você deve selecionar uma categoria para todos os segmentos que você está enviando!"
},

View File

@@ -99,18 +99,12 @@
"hideInfoButton": {
"message": "Esconder botão de Informações no player do Youtube"
},
"whatInfoButton": {
"message": "Este é o botão que abre o popup na pagina do Youtube."
},
"hideDeleteButton": {
"message": "Esconder botão de Apagar no player do Youtube"
},
"showDeleteButton": {
"message": "Mostrar botão de Apagar no player do Youtube"
},
"whatDeleteButton": {
"message": "Este é o botão que lhe permite saltar todos os patrocínios do player do Youtube."
},
"showNotice": {
"message": "Mostrar notificação outra vez"
},

View File

@@ -176,18 +176,12 @@
"hideInfoButton": {
"message": "Ascunde Butoanele De Informații Pe Playerul De YouTube"
},
"whatInfoButton": {
"message": "Acesta este butonul care deschide popup-ul pe pagina de YouTube."
},
"hideDeleteButton": {
"message": "Ascunde Butonul De Ștergere Pe Playerul De YouTube"
},
"showDeleteButton": {
"message": "Arată Butonul De Ștergere Pe Playerul De YouTube"
},
"whatDeleteButton": {
"message": "Acest buton de pe playerul de YouTube va șterge toate segmentele netrimise pentru videoclipul curent."
},
"enableViewTracking": {
"message": "Activează Urmărirea Săriturilor"
},
@@ -359,9 +353,6 @@
"showUploadButton": {
"message": "Arată Butonul De Încărcare"
},
"whatUploadButton": {
"message": "Acest buton apare pe playerul YouTube după ce ați selectat un marcaj de timp și sunteți gata să îl trimiteți."
},
"customServerAddress": {
"message": "Adresa Serverului SponsorBlock"
},

View File

@@ -182,15 +182,15 @@
"hideButtonsDescription": {
"message": "Эта настройка скрывает кнопки для отправки сегментов, расположенные в плеере YouTube."
},
"showSkipButton": {
"message": "Показывать кнопку \"Пропустить до важного\" в плеере"
},
"showInfoButton": {
"message": "Показывать кнопку информации в плеере YouTube"
},
"hideInfoButton": {
"message": "Скрыть кнопку информации в плеере YouTube"
},
"whatInfoButton": {
"message": "Эта кнопка открывает всплывающее окно на странице YouTube."
},
"autoHideInfoButton": {
"message": "Автоматически скрывать кнопку Информация"
},
@@ -200,9 +200,6 @@
"showDeleteButton": {
"message": "Показывать кнопку удаления в плеере YouTube"
},
"whatDeleteButton": {
"message": "Эта кнопка позволяет Вам очистить все неотправленные сегменты в плеере YouTube для текущего видео."
},
"enableViewTracking": {
"message": "Включить отслеживание количества пропусков сегментов"
},
@@ -442,9 +439,6 @@
"showUploadButton": {
"message": "Показывать кнопку отправки"
},
"whatUploadButton": {
"message": "Эта кнопка появляется в плеере YouTube после того, как Вы выбрали отметку времени и готовы к отправке."
},
"customServerAddress": {
"message": "Адрес сервера SponsorBlock"
},

View File

@@ -188,9 +188,6 @@
"hideInfoButton": {
"message": "Skryť info tlačidlo v YouTube prehrávači"
},
"whatInfoButton": {
"message": "Toto tlačidlo zobrazí vyskakovacie okno na YouTube stránke."
},
"autoHideInfoButton": {
"message": "Automaticky skryť tlačidlo Info"
},
@@ -200,9 +197,6 @@
"showDeleteButton": {
"message": "Zobraziť tlačidlo Zmazať v YouTube prehrávači"
},
"whatDeleteButton": {
"message": "Toto tlačidlo v YouTube prehrávači zmaže všetky ešte neodoslané segmenty v aktuálnom videu."
},
"enableViewTracking": {
"message": "Zapnúť počítanie preskočení"
},
@@ -427,9 +421,6 @@
"showUploadButton": {
"message": "Ukázať Nahrávacie Tlačidlo"
},
"whatUploadButton": {
"message": "Toto tlačidlo sa zobrazí v YouTube prehrávači po tom ako označíte začiatok a koniec segmentu na odoslanie."
},
"customServerAddress": {
"message": "Adresa serveru SponsorBlock"
},

View File

@@ -188,9 +188,6 @@
"hideInfoButton": {
"message": "Dölj Infoknapp På YouTube-spelaren"
},
"whatInfoButton": {
"message": "Detta är knappen som öppnar popup-rutan på YouTube-sidan."
},
"autoHideInfoButton": {
"message": "Dölj informationsknappen automatiskt"
},
@@ -200,9 +197,6 @@
"showDeleteButton": {
"message": "Visa knappen ta bort på YouTube-spelaren"
},
"whatDeleteButton": {
"message": "Den här knappen på YouTube-spelaren rensar bort alla segment som ej har skickats in på aktuell video."
},
"enableViewTracking": {
"message": "Aktivera spåra antalet hoppa över"
},
@@ -442,9 +436,6 @@
"showUploadButton": {
"message": "Visa uppladdningsknapp"
},
"whatUploadButton": {
"message": "Denna knapp visas på YouTube-spelaren efter att du har valt en tidpunkt och är redo att rapportera."
},
"customServerAddress": {
"message": "Serveradress för SponsorBlock"
},

View File

@@ -176,18 +176,12 @@
"hideInfoButton": {
"message": "YouTube பிளேயரில் தகவல் பொத்தானை மறைக்கவும்"
},
"whatInfoButton": {
"message": "YouTube பக்கத்தில் ஒரு பாப்அப்பைத் திறக்கும் பொத்தான் இது."
},
"hideDeleteButton": {
"message": "YouTube பிளேயரில் நீக்கு பொத்தானை மறைக்க"
},
"showDeleteButton": {
"message": "YouTube பிளேயரில் நீக்கு பொத்தானைக் காட்டு"
},
"whatDeleteButton": {
"message": "இது YouTube பிளேயரில் உள்ள பொத்தானாகும், இது தற்போதைய வீடியோவிற்கு நீங்கள் சமர்ப்பிக்காத அனைத்து பகுதிகளையும் அழிக்கும்."
},
"enableViewTracking": {
"message": "ஸ்கிப் கவுண்ட் டிராக்கிங்கை இயக்கு"
},
@@ -359,9 +353,6 @@
"showUploadButton": {
"message": "பதிவேற்ற பொத்தானைக் காட்டு"
},
"whatUploadButton": {
"message": "நீங்கள் நேர முத்திரையைத் தேர்ந்தெடுத்து சமர்ப்பிக்கத் தயாரான பிறகு இந்த பொத்தான் YouTube பிளேயரில் தோன்றும்."
},
"customServerAddress": {
"message": "ஸ்பான்சர் பிளாக் சேவையக முகவரி"
},

View File

@@ -176,18 +176,12 @@
"hideInfoButton": {
"message": "YouTube ప్లేయర్‌లో సమాచారం బటన్‌ను దాచండి"
},
"whatInfoButton": {
"message": "ఇది YouTube పేజీలో పాపప్‌ను తెరిచే బటన్."
},
"hideDeleteButton": {
"message": "YouTube ప్లేయర్‌లో తొలగించు బటన్‌ను దాచండి"
},
"showDeleteButton": {
"message": "YouTube ప్లేయర్‌లో తొలగించు బటన్‌ను చూపించు"
},
"whatDeleteButton": {
"message": "ఇది YouTube ప్లేయర్‌లోని బటన్, ఇది ప్రస్తుత వీడియో కోసం మీరు సమర్పించని అన్ని విభాగాలను క్లియర్ చేస్తుంది."
},
"enableViewTracking": {
"message": "స్కిప్ కౌంట్ ట్రాకింగ్‌ను ప్రారంభించండి"
},
@@ -359,9 +353,6 @@
"showUploadButton": {
"message": "అప్‌లోడ్ బటన్ చూపించు"
},
"whatUploadButton": {
"message": "మీరు టైమ్‌స్టాంప్‌ను ఎంచుకుని సమర్పించడానికి సిద్ధంగా ఉన్న తర్వాత ఈ బటన్ YouTube ప్లేయర్‌లో కనిపిస్తుంది."
},
"customServerAddress": {
"message": "స్పాన్సర్బ్లాక్ సర్వర్ చిరునామా"
},

View File

@@ -188,9 +188,6 @@
"hideInfoButton": {
"message": "YouTube Oynatıcısındaki Bilgi Butonunu Gizle"
},
"whatInfoButton": {
"message": "Bu, YouTube sayfasında açılan pencereyi açan butondur."
},
"autoHideInfoButton": {
"message": "Bilgi düğmesini otomatik gizle"
},
@@ -200,9 +197,6 @@
"showDeleteButton": {
"message": "YouTube Oynatıcısında Silme Tuşunu Göster"
},
"whatDeleteButton": {
"message": "Bu, YouTube oynatıcısındaki mevcut video için gönderilmemiş bölümleri temizleyen butondur."
},
"enableViewTracking": {
"message": "Kısım Atlama Sayaç Takibine İzin Ver"
},
@@ -436,9 +430,6 @@
"showUploadButton": {
"message": "Karşıya Yükleme Butonunu Göster"
},
"whatUploadButton": {
"message": "Bu buton, YouTube oynatıcısında bir zaman seçtiğiniz ve göndermeye hazır olduğunuzda gözükür."
},
"customServerAddress": {
"message": "SponsorBlock Sunucu Adresi"
},

View File

@@ -182,15 +182,15 @@
"hideButtonsDescription": {
"message": "Це налаштування приховує кнопки для надсилання спонсорських вставок, які з'являються в плеєрі YouTube."
},
"showSkipButton": {
"message": "Залишати кнопку \"Перейти до Основне\" на плеєрі"
},
"showInfoButton": {
"message": "Показувати кнопку інформації в плеєрі YouTube"
},
"hideInfoButton": {
"message": "Приховати кнопку інформації в плеєрі YouTube"
},
"whatInfoButton": {
"message": "Ця кнопка відкриває спливаюче вікно на сторінці YouTube."
},
"autoHideInfoButton": {
"message": "Кнопка \"Автоматично сховати інформацію\""
},
@@ -200,9 +200,6 @@
"showDeleteButton": {
"message": "Показувати кнопку видалення в плеєрі YouTube"
},
"whatDeleteButton": {
"message": "Ця кнопка дозволяє очистити всі спонсорські вставки в плеєрі YouTube."
},
"enableViewTracking": {
"message": "Увімкнути відстеження кількості пропусків сегментів"
},
@@ -442,9 +439,6 @@
"showUploadButton": {
"message": "Показувати кнопку надсилання"
},
"whatUploadButton": {
"message": "Ця кнопка з'являється в плеєрі YouTube після того, як Ви вибрали позначку часу і готові до надсилання."
},
"customServerAddress": {
"message": "Адреса сервера SponsorBlock"
},
@@ -597,7 +591,7 @@
"message": "Пропуск вручну"
},
"showOverlay": {
"message": "Показувати в смузі прокрутки"
"message": "Показувати в смузі перемотування"
},
"disable": {
"message": "Вимкнути"
@@ -606,7 +600,7 @@
"message": "Автоматический переход к началу"
},
"manualSkip_POI": {
"message": "Спросите, когда видео загружается"
"message": "Спитати поки відео завантажується"
},
"showOverlay_POI": {
"message": "Показать на панели поиска"

View File

@@ -188,9 +188,6 @@
"hideInfoButton": {
"message": "Không hiển thị nút thông tin trên trình chạy video Youtube"
},
"whatInfoButton": {
"message": "Đây là nút để mở bảng popup trên trang Youtube."
},
"autoHideInfoButton": {
"message": "Tự động ẩn nút Info"
},
@@ -200,9 +197,6 @@
"showDeleteButton": {
"message": "Hiển thị nút xóa trên trình chạy video Youtube"
},
"whatDeleteButton": {
"message": "Đây là nút trên trình chạy video Youtube để xóa tất cả những đoạn quảng cáo chưa đăng của bạn trong video đang xem."
},
"enableViewTracking": {
"message": "Bật tính năng theo dõi số quảng cáo được bỏ qua"
},
@@ -423,9 +417,6 @@
"showUploadButton": {
"message": "Hiển thị nút tải lên"
},
"whatUploadButton": {
"message": "Nút này xuất hiện trên trình chạy video Youtube sau khi bạn chọn mốc thời gian và sẵn sàng đăng đoạn quảng cáo."
},
"customServerAddress": {
"message": "Địa chỉ máy chủ SponsorBlock"
},

View File

@@ -179,18 +179,12 @@
"hideInfoButton": {
"message": "在 Youtube 播放器上隐藏信息按钮"
},
"whatInfoButton": {
"message": "此按钮用于在 Youtube 页面中打开弹窗。"
},
"hideDeleteButton": {
"message": "在 Youtube 播放器上隐藏删除按钮"
},
"showDeleteButton": {
"message": "在 Youtube 播放器上显示删除按钮"
},
"whatDeleteButton": {
"message": "此按钮用于在 Youtube 播放器中清除所有赞助商广告。"
},
"enableViewTracking": {
"message": "启用跳过次数统计跟踪"
},
@@ -365,9 +359,6 @@
"showUploadButton": {
"message": "显示上传按钮"
},
"whatUploadButton": {
"message": "在您选择了时间并准备提交后,此按钮会出现在 Youtube 播放器中。"
},
"customServerAddress": {
"message": "SponsorBlock 服务器地址"
},

View File

@@ -185,9 +185,6 @@
"hideInfoButton": {
"message": "在 YouTube 播放器上隱藏資訊按鈕"
},
"whatInfoButton": {
"message": "這個按鈕可用來在 YouTube 頁面打開彈出視窗"
},
"autoHideInfoButton": {
"message": "自動隱藏資訊按鈕"
},
@@ -197,9 +194,6 @@
"showDeleteButton": {
"message": "在 YouTube 播放器上顯示刪除按鈕"
},
"whatDeleteButton": {
"message": "這個按鈕可用來在 YouTube 播放器清除所有未提交的片段"
},
"enableViewTracking": {
"message": "啟用跳過次數追蹤"
},
@@ -396,9 +390,6 @@
"showUploadButton": {
"message": "顯示上傳按鈕"
},
"whatUploadButton": {
"message": "在您選擇了時間範圍並準備提交後,此按鈕會出現在 YouTube 播放器中。"
},
"customServerAddress": {
"message": "SponsorBlock 伺服器地址"
},

View File

@@ -274,8 +274,8 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
if (countdownTime == 3) {
//start fade out animation
const notice = document.getElementById("sponsorSkipNotice" + this.idSuffix);
notice.style.removeProperty("animation");
notice.classList.add("sponsorSkipNoticeFadeOut");
notice?.style.removeProperty("animation");
notice?.classList.add("sponsorSkipNoticeFadeOut");
}
this.setState({

View File

@@ -16,6 +16,7 @@ import * as Chat from "./js-components/chat";
import { getCategoryActionType } from "./utils/categoryUtils";
import { SkipButtonControlBar } from "./js-components/skipButtonControlBar";
import { Tooltip } from "./render/Tooltip";
import { getStartTimeFromUrl } from "./utils/urlParser";
// Hack to get the CSS loaded on permission-based sites (Invidious)
utils.wait(() => Config.config !== null, 5000, 10).then(addCSS);
@@ -29,6 +30,7 @@ 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;
@@ -387,11 +389,11 @@ function durationChangeListener(): void {
updateAdFlag();
updatePreviewBar();
sponsorTimes = sponsorTimes.filter(segmentDurationFilter);
if (sponsorTimes) sponsorTimes = sponsorTimes.filter(segmentDurationFilter);
}
function segmentDurationFilter(segment: SponsorTime): boolean {
return segment.videoDuration === 0 || video.duration === 0 || Math.abs(video.duration - segment.videoDuration) < 2;
return segment.videoDuration === 0 || !video?.duration || Math.abs(video.duration - segment.videoDuration) < 2;
}
function cancelSponsorSchedule(): void {
@@ -557,13 +559,17 @@ function setupVideoListeners() {
switchingVideos = false;
video.addEventListener('play', () => {
switchingVideos = false;
// If it is not the first event, then the only way to get to 0 is if there is a seek event
// This check makes sure that changing the video resolution doesn't cause the extension to think it
// gone back to the begining
if (!firstEvent && video.currentTime === 0) return;
firstEvent = false;
if (switchingVideos) {
switchingVideos = false;
// If already segments loaded before video, retry to skip starting segments
if (sponsorTimes) startSkipScheduleCheckingForStartSponsors();
}
// Check if an ad is playing
updateAdFlag();
@@ -602,7 +608,9 @@ function setupVideoListeners() {
getCategoryActionType(segment.category) === CategoryActionType.POI &&
video.currentTime - segment.segment[0] > 0 &&
video.currentTime - segment.segment[0] < previewBar.getMinimumSize(true));
if (currentPoiSegment && !skipNotices.some((notice) => notice.segments.some((s) => s.UUID === currentPoiSegment.UUID))) {
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,
@@ -766,24 +774,27 @@ function retryFetch(): void {
* Ex. When segments are first loaded
*/
function startSkipScheduleCheckingForStartSponsors() {
if (!switchingVideos) {
if (!switchingVideos && sponsorTimes) {
// See if there are any starting sponsors
let startingSegmentTime = -1;
let startingSegmentTime = getStartTimeFromUrl(document.URL) || -1;
let found = false;
let startingSegment: SponsorTime = null;
for (const time of sponsorTimes) {
if (time.segment[0] <= video.currentTime && time.segment[0] > startingSegmentTime && time.segment[1] > video.currentTime
&& getCategoryActionType(time.category) === CategoryActionType.Skippable) {
startingSegmentTime = time.segment[0];
startingSegment = time;
found = true;
break;
}
}
if (startingSegmentTime === -1) {
if (!found) {
for (const time of sponsorTimesSubmitting) {
if (time.segment[0] <= video.currentTime && time.segment[0] > startingSegmentTime && time.segment[1] > video.currentTime
&& getCategoryActionType(time.category) === CategoryActionType.Skippable) {
startingSegmentTime = time.segment[0];
startingSegment = time;
found = true;
break;
}
}
@@ -840,7 +851,7 @@ function getYouTubeVideoID(url: string): string | boolean {
if(url.startsWith("https://www.youtube.com/tv#/")) url = url.replace("#", "");
//Attempt to parse url
let urlObject = null;
let urlObject: URL = null;
try {
urlObject = new URL(url);
} catch (e) {
@@ -866,9 +877,10 @@ function getYouTubeVideoID(url: string): string | boolean {
if (urlObject.searchParams.has("v") && ["/watch", "/watch/"].includes(urlObject.pathname) || urlObject.pathname.startsWith("/tv/watch")) {
const id = urlObject.searchParams.get("v");
return id.length == 11 ? id : false;
} else if (urlObject.pathname.startsWith("/embed/")) {
} else if (urlObject.pathname.startsWith("/embed/") || urlObject.pathname.startsWith("/shorts/")) {
try {
return urlObject.pathname.substr(7, 11);
const id = urlObject.pathname.split("/")[2];
if (id && id.length >= 11) return id.substr(0, 11);
} catch (e) {
console.error("[SB] Video ID not valid for " + url);
return false;
@@ -919,7 +931,7 @@ function updatePreviewBar(): void {
});
});
previewBar.set(previewBarSegments, video.duration)
previewBar.set(previewBarSegments, video?.duration)
if (Config.config.showTimeWithSkips) {
const skippedDuration = utils.getTimestampsDuration(previewBarSegments.map(({segment}) => segment));
@@ -1387,7 +1399,7 @@ function getRealCurrentTime(): number {
if (playButtonSVGData === replaceSVGData) {
// At the end of the video
return video.duration;
return video?.duration;
} else {
return video.currentTime;
}
@@ -1887,7 +1899,7 @@ function showTimeWithoutSkips(skippedDuration: number): void {
display.appendChild(duration);
}
const durationAfterSkips = utils.getFormattedTime(video.duration - skippedDuration)
const durationAfterSkips = utils.getFormattedTime(video?.duration - skippedDuration)
duration.innerText = (durationAfterSkips == null || skippedDuration <= 0) ? "" : " (" + durationAfterSkips + ")";
}

View File

@@ -205,10 +205,12 @@ export default class Utils {
enableAutoHideAnimation(element: Element): void {
element.classList.add("autoHiding");
element.classList.add("hidden");
}
disableAutoHideAnimation(element: Element): void {
element.classList.remove("autoHiding");
element.classList.remove("hidden");
}
/**

26
src/utils/urlParser.ts Normal file
View File

@@ -0,0 +1,26 @@
export function getStartTimeFromUrl(url: string): number {
const urlParams = new URLSearchParams(url);
const time = urlParams?.get('t') || urlParams?.get('time_continue');
return urlTimeToSeconds(time);
}
export function urlTimeToSeconds(time: string): number {
if (!time) {
return 0;
}
const re = /(?:(\d{1,3})h)?(?:(\d{1,2})m)?(\d+)s?/;
const match = re.exec(time);
if (match) {
const hours = parseInt(match[1] ?? '0', 10);
const minutes = parseInt(match[2] ?? '0', 10);
const seconds = parseInt(match[3] ?? '0', 10);
return hours * 3600 + minutes * 60 + seconds;
} else if (/\d+/.test(time)) {
return parseInt(time, 10);
}
}

View File

@@ -3,7 +3,15 @@ import * as Chrome from "selenium-webdriver/chrome";
import * as Path from "path";
test("Selenium Chrome test", async () => {
const driver = await setup();
let driver;
try {
driver = await setup();
} catch (e) {
console.warn("A browser is probably not installed, skipping selenium tests");
console.warn(e);
return;
}
try {
await waitForInstall(driver);

27
test/urlParser.test.ts Normal file
View File

@@ -0,0 +1,27 @@
import { getStartTimeFromUrl } from '../src/utils/urlParser';
describe("getStartTimeFromUrl", () => {
it("parses with a number", () => {
expect(getStartTimeFromUrl("https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=123")).toBe(123);
});
it("parses with seconds", () => {
expect(getStartTimeFromUrl("https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=123s")).toBe(123);
});
it("parses with minutes", () => {
expect(getStartTimeFromUrl("https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=23m3s")).toBe(23 * 60 + 3);
});
it("parses with hours", () => {
expect(getStartTimeFromUrl("https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=1h2m3s")).toBe(1 * 60 * 60 + 2 * 60 + 3);
});
it("works with time_continue", () => {
expect(getStartTimeFromUrl("https://www.youtube.com/watch?v=dQw4w9WgXcQ&time_continue=123")).toBe(123);
});
it("works with no time", () => {
expect(getStartTimeFromUrl("https://www.youtube.com/watch?v=dQw4w9WgXcQ")).toBe(0);
});
});