gridwax icon indicating copy to clipboard operation
gridwax copied to clipboard

Refused to execute script from

Open rinatio opened this issue 10 years ago • 7 comments

I'm getting an error in console:

Refused to execute script from 'https://raw.github.com/itsthatguy/gridwax/master/gridwax.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

rinatio avatar Aug 01 '14 08:08 rinatio

I found this stackoverflow post that describes the problem and a workaround:

http://stackoverflow.com/questions/17341122/link-and-execute-external-javascript-file-hosted-on-github

From the post it says: "GitHub started using X-Content-Type-Options: nosniff, which instructs more modern browsers to enforce strict MIME type checking. It then returns the raw files in a MIME type returned by the server - preventing the browser from using the file as-intended (if the browser honors the setting)."

The work around was to use rawgit.com instead. However it is warned that this content is no longer being served from GitHub.

mboltuc avatar Jan 21 '15 22:01 mboltuc

@mboltuc do you want to submit a pull request with the fix?

itsthatguy avatar Jan 21 '15 23:01 itsthatguy

For chrome you can just edit and replace by this link from http://rawgit.com/ https://rawgit.com/itsthatguy/gridwax/master/gridwax.js work's with Mozilla too..

manolenso avatar Feb 16 '15 22:02 manolenso

@itsthatguy Is the source code for the website in the repo? I can't find it, and what needs to change is the code in there.

radum avatar Mar 04 '15 10:03 radum

pretty simple! just right-click to the link dropped from gridwax.gs site, "modify" change the adress between quotes by the rawgit adress below.

manolenso avatar Mar 04 '15 14:03 manolenso

Obviously @manolenso but that is not the point is it :grinning:?

radum avatar Mar 04 '15 14:03 radum

@radum https://github.com/itsthatguy/gridwax-site

itsthatguy avatar Mar 09 '15 15:03 itsthatguy