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

Bookmarklet doesn't work on some sites #196

Closed
NerosTie opened this issue Apr 9, 2015 · 9 comments
Closed

Bookmarklet doesn't work on some sites #196

NerosTie opened this issue Apr 9, 2015 · 9 comments

Comments

@NerosTie
Copy link

NerosTie commented Apr 9, 2015

If I want to share a link from github using the bookmark, nothing happen. It works well everywhere else.

@pikzen
Copy link

pikzen commented Apr 9, 2015

GitHub activated CSP (Content Security Policy) a while ago now, every browser basically breaks javascript: URIs when CSP is on. See https://github.com/blog/1477-content-security-policy ,section Shortcomings.

Workaround (Firefox): go to about:config, set security.csp.enable to false. Do not do that.

@Marsup
Copy link

Marsup commented Apr 9, 2015

The Firefox extension works fine. Probably Chrome's too.

@NerosTie
Copy link
Author

NerosTie commented Apr 9, 2015

@pikzen nothing we can do?

@Marsup I prefer the bookmark for some reasons, but good to know!

@pikzen
Copy link

pikzen commented Apr 9, 2015

Nothing that I know of. Submitting a PR to Firefox maybe :D

I'll look around but AFAIK CSP is pretty broken

@nodiscc
Copy link
Member

nodiscc commented Apr 9, 2015

There is no way around CSP, except disabling it ( security.csp.enable), which is a bad idea for security reasons.

You can read more about this problem at sebsauvage#94. This is a browser bug: read https://bugzilla.mozilla.org/show_bug.cgi?id=866522 (by the CSP spec, bookmarklets shouldn't be affected, but they are).

I'll leave this bug open for some time, in case there is more info to add. I think a Question/Answer should be added to the FAQ in the wiki.

@nodiscc nodiscc changed the title I can't share a link from github Bookmarklet doesn't work on some sites Apr 14, 2015
@nodiscc
Copy link
Member

nodiscc commented Apr 14, 2015

Closing. This is a browser bug.

@nodiscc nodiscc closed this as completed Apr 14, 2015
@nodiscc
Copy link
Member

nodiscc commented Jun 25, 2015

Reopening because this should be documented on the wiki. Feel free to edit the doc.

@nodiscc nodiscc reopened this Jun 25, 2015
@ArthurHoaro
Copy link
Member

ArthurHoaro commented Nov 6, 2015

Documentation added.

EDIT 2018-02-07 by @virtualtam: documentation has moved to ReadTheDocs

@virtualtam
Copy link
Member

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

No branches or pull requests

6 participants