Nitrino / easysubs

Browser extension for learning languages with watching movies and TV shows
https://easysubs.cc
MIT License
244 stars 22 forks source link

Translation doesn't show up on YouTube #204

Closed ghost closed 3 years ago

ghost commented 3 years ago

I've just installed the extension, it loads the interface and I can access Easysubs settings, but if I hover the words, they turn blue, but nothing happens besides that, and if I click a word, the word turns grey again, but also nothing else happens.

FireFox 90.0

Nitrino commented 3 years ago

Hi @Sentero-esp12 Perhaps your translation language is the same as the subtitle language. Check that the desired language is set in the settings

image
ghost commented 3 years ago

Hi @Nitrino, the subtitles are in a different language. The "Translation language" is set to English. I've tried with different languages, and I'm getting the same problem. This is an example video: https://www.youtube.com/watch?v=lZMMqMvY1d0 My OS is Linux Mint 20.2 (but I guess it shouldn't make a difference) This is a screenshot: image

Nitrino commented 3 years ago

@Sentero-esp12 I was able to repeat this issue in Firefox, it seems Google blocks requests from Firefox. I need some time to investigate the issue. While please use the version for Google Chrome. I will inform in this thread as soon as I will fix the issue

jtraub commented 3 years ago

@Nitrino I do believe that this change is the reason why Google Translate responds with 403 error on any requests from background script

UPD: a quick test

❯ curl -o /dev/null -s -w "%{http_code}\n" "https://translate.google.com/"
200

❯ curl --header "Sec-Fetch-Site: cross-site" -o /dev/null -s -w "%{http_code}\n" "https://translate.google.com/"
403

UPD2: Sec-Fetch-Site is the cause of the problem indeed. Setting dom.security.secFetch.enabled to false in about:config allows EasySubs to work in Fx 90.

Nitrino commented 3 years ago

Hi @jtraub Thanks for investigating, it will save me a lot of time 👍

Nitrino commented 3 years ago

Hi @Sentero-esp12, @jtraub It seems I was able to come up with a hack to fix the work in Firefox.

Can you please test this version? release.zip

jtraub commented 3 years ago

@Nitrino works for me in Fx 91.0 (64-bit) under Linux

Nitrino commented 3 years ago

@jtraub Cool, I will release soon

Nitrino commented 3 years ago

Version 1.5.6 released