admin管理员组文章数量:1426066
I know jsFiddle used to support arbitrary javascript files from GitHub, but not anymore. May be GitHub has changed its mime type of raw files. what are the alternatives when the required js files is not in any cdn (may be its less popular js repo).
I know jsFiddle used to support arbitrary javascript files from GitHub, but not anymore. May be GitHub has changed its mime type of raw files. what are the alternatives when the required js files is not in any cdn (may be its less popular js repo).
Share Improve this question edited Oct 5, 2013 at 20:45 Dhana Krishnasamy asked Oct 3, 2013 at 11:52 Dhana KrishnasamyDhana Krishnasamy 2,17618 silver badges36 bronze badges 1- That citations doesn't make your question better, this is actually exactly the type of question you should not ask. Better ask "How can i include javascript libraries from arbitrary github repositories without hosting them myself when fiddling around" – Bergi Commented Oct 5, 2013 at 18:41
1 Answer
Reset to default 9It's an old question I see, but still I've found the answer:
- Get the Raw URL of the Github file you need to include. e.g. you will have https://raw.github./k4r573n/leaflet-control-osm-geocoder/master/Control.OSMGeocoder.css
- Remove the dot (.) between "raw" and "github" and use that resulting url in the jsfiddle. e.g. you will end up having https://rawgithub./k4r573n/leaflet-control-osm-geocoder/master/Control.OSMGeocoder.css that works just perfect in jsfiddle.
Why this works? because of the rawgithub. service that serves the content with the correct MIME type.
And obviously, credits to http://www.geekdave./2013/06/19/linking-raw-github-files-from-jsfiddle/ where I actually found the answer I needed.
Cheers!
本文标签: How do I add arbitrary javascript files from GitHub in jsFiddleStack Overflow
版权声明:本文标题:How do I add arbitrary javascript files from GitHub in jsFiddle? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745388363a2656480.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论