Skip to content

Commit

Permalink
improved logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyhalight committed Sep 17, 2024
1 parent c833a22 commit 05104ce
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 105 deletions.
6 changes: 3 additions & 3 deletions README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ You can see all the restrictions related to site support in [wiki](https://githu
- **[Twitch](https://www.twitch.tv)**
- **[VK](https://vk.com)**
- **[OK](https://ok.ru/)**
- **[[⚠️] Twitter](https://twitter.com/)**
- **[Twitter](https://twitter.com/)**
- **[9GAG](https://9gag.com/gag/)**
- **[Rutube](https://rutube.ru/)**
- **[Bilibili](https://bilibili.com/)**
Expand All @@ -61,14 +61,14 @@ You can see all the restrictions related to site support in [wiki](https://githu
- **[Bitchute](https://www.bitchute.com/)**
- **[Coursera](https://www.coursera.org/)**
- **[[⚠️] Udemy](https://www.udemy.com/)**
- **[[⚠️] Facebook\*](https://facebook.com/)**
- **[Facebook\*](https://facebook.com/)**
- **[TikTok](https://tiktok.com/)**
- **[Rumble](https://rumble.com/)**
- **[EPorner](https://www.eporner.com/)**
- **[Peertube](https://tube.shanti.cafe/)**
- **[Dailymotion](https://www.dailymotion.com/)**
- **[Trovo](https://trovo.live/)**
- **[[⚠️] Yandex Disk](https://disk.yandex.ru/)**
- **[Yandex Disk](https://disk.yandex.ru/)**
- **[Google Drive](https://drive.google.com/)**
- **[Banned Video](https://banned.video/)**
- **[Weverse](https://weverse.io/)**
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
- **[Twitch](https://www.twitch.tv)**
- **[VK](https://vk.com)**
- **[OK](https://ok.ru/)**
- **[[⚠️] Twitter](https://twitter.com/)**
- **[Twitter](https://twitter.com/)**
- **[9GAG](https://9gag.com/gag/)**
- **[Rutube](https://rutube.ru/)**
- **[Bilibili](https://bilibili.com/)**
Expand All @@ -62,14 +62,14 @@
- **[Bitchute](https://www.bitchute.com/)**
- **[Coursera](https://www.coursera.org/)**
- **[[⚠️] Udemy](https://www.udemy.com/)**
- **[[⚠️] Facebook\*](https://facebook.com/)**
- **[Facebook\*](https://facebook.com/)**
- **[TikTok](https://tiktok.com/)**
- **[Rumble](https://rumble.com/)**
- **[EPorner](https://www.eporner.com/)**
- **[Peertube](https://tube.shanti.cafe/)**
- **[Dailymotion](https://www.dailymotion.com/)**
- **[Trovo](https://trovo.live/)**
- **[[⚠️] Yandex Disk](https://disk.yandex.ru/)**
- **[Yandex Disk](https://disk.yandex.ru/)**
- **[Google Drive](https://drive.google.com/)**
- **[Banned Video](https://banned.video/)**
- **[Weverse](https://weverse.io/)**
Expand Down
2 changes: 1 addition & 1 deletion dist/vot-min.user.js

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions dist/vot.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -8945,13 +8945,7 @@ class VideoHandler {
this.lipSync(event.type);
};

needBypassCSP = () => {
if (!this.data.bypassMediaCSP) {
return false;
}

return this.site.needBypassCSP;
};
needBypassCSP = () => this.data.bypassMediaCSP && this.site.needBypassCSP;

// Default actions on stop translate
stopTranslate() {
Expand Down
38 changes: 24 additions & 14 deletions scripts/wiki-gen/SITES-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ Available paths:
Limitations:

- Doesn't work in the video preview
- To work, you must completely remove [CSP](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) with pages
- 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 @@ -97,7 +99,10 @@ Available paths:
Limitations:

- Doesn't work in the video preview
- To work, you must completely remove [CSP](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) with pages
- 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 @@ -235,7 +240,7 @@ Available paths:

Limitations:

- To work, you may need to add a script to the [CSP](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ)
- 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

## Pornhub

Expand All @@ -257,7 +262,7 @@ Limitations:

## Twitter

Status: [⚠️] Works with limitations
Status: [] Working

Available (sub)domains:

Expand All @@ -270,8 +275,9 @@ Available paths:

Limitations:

- To work, you need to add a script to the [CSP](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ)
- 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 All @@ -291,7 +297,7 @@ Limitations:

## Facebook

Status: [⚠️] Works with limitations
Status: [] Working

Available (sub)domains:

Expand All @@ -304,7 +310,7 @@ Available paths:

Limitations:

- To work, you need to add a script to the [CSP](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ)
- 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

## Rutube

Expand Down Expand Up @@ -431,7 +437,7 @@ Limitations:

## Yandex Disk

Status: [⚠️] Works with limitations
Status: [] Working

Available (sub)domains:

Expand All @@ -443,8 +449,9 @@ Available paths:

Limitations:

- To work, you need to add a script to the [CSP](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ)
- 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 @@ -592,7 +599,8 @@ Available paths:
Limitations:

- There are no subtitles
- To work, you must completely remove [CSP](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) with pages
- 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 @@ -627,6 +635,8 @@ Available paths:
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 @@ -719,7 +729,7 @@ Limitations:

## Sap

Status: [⚠️] Works with limitations
Status: [] Working

Available (sub)domains:

Expand All @@ -732,7 +742,7 @@ Available paths:

Limitations:

- To work, you must completely remove [CSP](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) with pages
- 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

## Watchpornto

Expand All @@ -749,7 +759,7 @@ Available paths:

## Linkedin

Status: [⚠️] Works with limitations
Status: [] Working

Available (sub)domains:

Expand All @@ -762,7 +772,7 @@ Available paths:

Limitations:

- To work, you must completely remove [CSP](https://github.com/ilyhalight/voice-over-translation/wiki/%5BEN%5D-FAQ) with pages
- 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

Expand Down
30 changes: 16 additions & 14 deletions scripts/wiki-gen/SITES-RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
Ограничения:

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

## Piped

Expand Down Expand Up @@ -97,7 +97,8 @@
Ограничения:

- Не работает в предпросмотре видео
- Для работы необходимо полностью удалить [CSP](https://github.com/ilyhalight/voice-over-translation/wiki/%5BRU%5D-FAQ) со страницы
- Для гарантированной работы скрипта необходимо [включить настройку "Обход 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 @@ -235,7 +236,7 @@

Ограничения:

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

## Pornhub

Expand All @@ -257,7 +258,7 @@

## Twitter

Статус: [⚠️] Работает с ограничениями
Статус: [] Работает

Доступные (под)домены:

Expand All @@ -270,8 +271,8 @@

Ограничения:

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

## Rumble

Expand All @@ -291,7 +292,7 @@

## Facebook

Статус: [⚠️] Работает с ограничениями
Статус: [] Работает

Доступные (под)домены:

Expand All @@ -304,7 +305,7 @@

Ограничения:

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

## Rutube

Expand Down Expand Up @@ -431,7 +432,7 @@

## Yandex Disk

Статус: [⚠️] Работает с ограничениями
Статус: [] Работает

Доступные (под)домены:

Expand All @@ -443,8 +444,8 @@

Ограничения:

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

## OK.ru

Expand Down Expand Up @@ -592,7 +593,7 @@
Ограничения:

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

## Kick

Expand Down Expand Up @@ -627,6 +628,7 @@
Ограничения:

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

## Epicgames

Expand Down Expand Up @@ -719,7 +721,7 @@

## Sap

Статус: [⚠️] Работает с ограничениями
Статус: [] Работает

Доступные (под)домены:

Expand All @@ -732,7 +734,7 @@

Ограничения:

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

## Watchpornto

Expand All @@ -749,7 +751,7 @@

## Linkedin

Статус: [⚠️] Работает с ограничениями
Статус: [] Работает

Доступные (под)домены:

Expand All @@ -762,7 +764,7 @@

Ограничения:

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

## Direct link to MP4

Expand Down
Loading

0 comments on commit 05104ce

Please sign in to comment.