Skip to content

Commit

Permalink
Merge pull request #814 from ilyhalight/fix-wiki-gen
Browse files Browse the repository at this point in the history
fix wiki-gen script
  • Loading branch information
ilyhalight authored Sep 17, 2024
2 parents cc9d026 + 0d812f5 commit 231432a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
11 changes: 1 addition & 10 deletions scripts/wiki-gen/SITES-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ Limitations:

- Doesn't work in the video preview
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way

## Piped

Expand Down Expand Up @@ -100,9 +98,6 @@ Limitations:

- Doesn't work in the video preview
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way

## Poketube

Expand Down Expand Up @@ -277,7 +272,6 @@ Limitations:

- The translation in the feed doesn't work (It only works in open videos)
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way

## Rumble

Expand Down Expand Up @@ -451,7 +445,6 @@ Limitations:

- It only works with public links
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way

## OK.ru

Expand Down Expand Up @@ -600,7 +593,6 @@ Limitations:

- There are no subtitles
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way

## Kick

Expand Down Expand Up @@ -636,7 +628,6 @@ Limitations:

- There are no subtitles
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way
- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way

## Epicgames

Expand Down Expand Up @@ -774,7 +765,7 @@ Limitations:

- To ensure that the script works, you need to [enable the "Bypass Media CSP" setting](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) in the extension or delete the CSP in another way

## Direct link to MP4
## Direct link to MP4/WEBM

Status: [] Working

Expand Down
3 changes: 1 addition & 2 deletions scripts/wiki-gen/SITES-RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@

- Не работает в предпросмотре видео
- Для гарантированной работы скрипта необходимо [включить настройку "Обход Media CSP"](https://github.com/ilyhalight/voice-over-translation/wiki/%5BRU%5D-FAQ) в расширение или удалить CSP другим способом
- Для гарантированной работы скрипта необходимо [включить настройку "Обход Media CSP"](https://github.com/ilyhalight/voice-over-translation/wiki/%5BRU%5D-FAQ) в расширение или удалить CSP другим способом

## Poketube

Expand Down Expand Up @@ -766,7 +765,7 @@

- Для гарантированной работы скрипта необходимо [включить настройку "Обход Media CSP"](https://github.com/ilyhalight/voice-over-translation/wiki/%5BRU%5D-FAQ) в расширение или удалить CSP другим способом

## Direct link to MP4
## Direct link to MP4/WEBM

Статус: [] Работает

Expand Down
5 changes: 3 additions & 2 deletions scripts/wiki-gen/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ function genMarkdown(sites, lang = "ru") {
return removeDuplicatesKeepLast(sitesData, "host").map((site) => {
const hasData = Object.hasOwn(siteData, site.host);
const limitsData = hasData ? siteData[site.host].limits ?? [] : [];
if (site.needBypassCSP) {
if (site.needBypassCSP && !limitsData.includes(locales.needBypassCSP)) {
console.log(site);
limitsData.push(locales.needBypassCSP);
}

Expand Down Expand Up @@ -154,7 +155,7 @@ async function main() {
.replace("Yandexdisk", "Yandex Disk")
.replace("Googledrive", "Google Drive")
.replace("Okru", "OK.ru")
.replace("Custom", "Direct link to MP4")
.replace("Custom", "Direct link to MP4/WEBM")
.replace("Bannedvideo", "Banned.Video")
.replace(
"geo.dailymotion.com",
Expand Down

0 comments on commit 231432a

Please sign in to comment.