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

Not working, because it violates the Content Security Policy #2

Open
PwnicornDev opened this issue Jan 21, 2014 · 3 comments
Open

Not working, because it violates the Content Security Policy #2

PwnicornDev opened this issue Jan 21, 2014 · 3 comments

Comments

@PwnicornDev
Copy link

The extension is not working, because it tries to load inline JavaScript:

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:".

(link added by me)

@balupton
Copy link
Member

Can you submit a pull request?

@PwnicornDev
Copy link
Author

Yeah, I can do that, but there seems to be more to fix.
I put the script in a separate file and it works so far as the button is now toggle-able and the page reloads on toggle (but only for non-HTTPS sites).
But after reload, the page is blank and the whole html of the page is replaced with this:

<html><head><script src="//balupton.github.io/jquery-scrollto/lib/jquery-scrollto.js"></script><style type="text/css"></style></head></html>

and I get the following errors in the console:
image
where the last one just keeps counting...
Shall I just send a pull request to fix the original issue now and open a separate issue for the latter?

@balupton
Copy link
Member

Hrmmm, probably fix all of it in one go if possible and straightforward enough.

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

No branches or pull requests

2 participants