Inject Google Translate Widget

Userscript version of "Google Translate This" from https://github.com/andreicristianpetcu/google_translate_this. v0.1 2019-11-03

От 06.11.2019. Виж последната версия.

Автор
Jefferson Scher
Рейтинг
0 0 0
Версия
0.1
Създаден
03.11.2019
Обновен
06.11.2019
Размер
2 КБ
Лиценз
GPL-3.0
Работи на
Всички сайтове

Userscript implementation because extensions cannot inject remotely hosted scripts like Google's Translate widget script.

To inject the widget, use the Violentmonkey or Tampermonkey menu. (If there is a way to do it in Greasemonkey, let me know.)

Version 0.1 does not let you specify sites where you want the widget injected automatically, but maybe someone will build that.

CSP Limitation

If you don't get the Google Translate bar, one possible reason would be Content Security Policy (CSP). This is a rule sites can set to control which script sources are allowed for a page. The developer tools Console (F12) may report this issue when it occurs.

I prefer inserting the bar on every page automatically (or I use Greasemonkey)

Here is an alternative script you could try (I haven't tested it myself): https://greatest.deepsurf.us/en/scripts/369624-google-translation-bar