Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Translate broken: "Add" button not appearing #44

Open
DavidFernandezBonet opened this issue Sep 20, 2021 · 1 comment
Open

Google Translate broken: "Add" button not appearing #44

DavidFernandezBonet opened this issue Sep 20, 2021 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@DavidFernandezBonet
Copy link

Your software

  • OS: Windows 10
  • Browser: Chrome
  • Extension: Tampermonkey

Describe the bug
The add button stopped appearing not long ago without having changed anything about my set-up. I have been using Google Translate. I am running updated version of browser/extension.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'translage.google.com'
  2. Open Anki Desktop
  3. Translate a word
  4. Anki "Add" button does not appear.

Expected behavior
Anki "Add" button should appear

Screenshots
image

@DavidFernandezBonet DavidFernandezBonet added the bug Something isn't working label Sep 20, 2021
@OoDeLally
Copy link
Owner

The console shows the following error:
This document requires 'TrustedHTML' assignment.

It seems that Google Translate made its CSP more restrictive. This is probably due to the answer's header:

content-security-policy: require-trusted-types-for 'script'

On Firefox I get similar error:

Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).

For now I unfortunately do not have a solution.
It is likely that it affects any userscript trying to run on Google Translate.

In addition I do not have a sufficient knowledge of CSPs to figure out whether there can be a workaround.

So wait and see... (suggestions and PR welcome!)

@OoDeLally OoDeLally added help wanted Extra attention is needed and removed bug Something isn't working labels Sep 21, 2021
@OoDeLally OoDeLally changed the title "Add" button not appearing Google Translate broken: "Add" button not appearing (Help needed) Jan 29, 2022
@OoDeLally OoDeLally changed the title Google Translate broken: "Add" button not appearing (Help needed) Google Translate broken: "Add" button not appearing Jan 29, 2022
@OoDeLally OoDeLally removed their assignment Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants