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

CSP Issue #14

Closed
tomouchuu opened this issue Nov 7, 2017 · 8 comments
Closed

CSP Issue #14

tomouchuu opened this issue Nov 7, 2017 · 8 comments
Labels

Comments

@tomouchuu
Copy link
Owner

your mastodon translate script doesn't seem to be working for me. I've been to settings and enabled it, and refreshed the page but it doesn't seem to add the translate option to the menu. Console implies it might be because of CSP headers.

Via rx14 - https://niu.moe/@rx14/98959035341618015


Looks to be working for me on chrome but firefox is just not working and seeing a CSP error when going from preferences to the feed. Need to investigate the script across tampermonkey versions.

@tomouchuu tomouchuu added the bug label Nov 7, 2017
@tomouchuu
Copy link
Owner Author

So it turns out it's not a CSP issue which is good (as that would likely be a problem with tampermonkey itself).

What's actually happening is that the event that adds the translate option to the toot dropdown on chrome is the icon itself. On firefox though it's the button so the function to add the translate toot is never added. Need to come up with a cross-browser fix for this!

@RX14
Copy link

RX14 commented Nov 16, 2017

It broke again in FF 57 suing greasemonkey :(

@tomouchuu
Copy link
Owner Author

Should be fixed in the latest update, I didn't know about the greasemonkey naming changes so have added those now.

Let me know if that's fixed it and I'll close the issue, thanks for letting me know!

@RX14
Copy link

RX14 commented Nov 17, 2017

It works, however it seemed intermittently working at the start. I'll keep my eye on it and make another bug if it persists, but it seems to work fine now. You can close this.

@tomouchuu
Copy link
Owner Author

Great thanks!

@RX14
Copy link

RX14 commented Dec 21, 2017

Seems that loading https://niu.moe/ doesn't load the script, but loading https://niu.moe/<anything> does.

@tomouchuu
Copy link
Owner Author

Yeah, this is related to #2
I don't want to just have load on any site you visit but can't hardcode in every mastodon instance. Ideally I'd want it to ask the user on first install or something.

Though just had a thought to maybe load on every site you visit but only activate if it finds some mastodon specific markup or something.

@RX14
Copy link

RX14 commented Dec 22, 2017

Perhaps it's a greasemonkey bug that the redirect from / to /web doesn't load the script. At least it used to do that before FF57 iirc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants