So a while ago I was playing on JSFiddle and I wanted to use some jQuery plug-ins directly from Github (via raw.github.com/...
)
but I would get a Refused to execute script from...
error whenever I tried to run the file.
It seems that the files on raw.github are sent with a text/plain
header, making it imposible for sites like JSFiddle and Codepen.io to execute them.
A solution I found was to basically use a CDN to load the plugin on JSFiddle (for example CDNJS), but the downs of using it is that it doesn’t have every library or maybe it has the library, but you need a newer version.
A even better solution I found is mentioned on rawgithub, that basically consists on deleting the dot on raw.github.com
so it reads like rawgithub.com
. Please use this only for demo purposes, and not for production, since the site states that it’s slow.
Credits go to @yaypie for putting up that information.