PAY ATTENTION!
You can\'t include Github scripts directly from Github after this change.
We added the
X-Conte
rawgit looks like shutting down by end of 2019,
some options for delivering content with with proper Content-Type headers.
You can include hosted CSS, HTML and JS file in GITHUB PAGES
Just click at the settings on your github repository then at this tab scroll down to the GitHub Pages and select with the dropdown
Then HOray you can now access it live
This is the raw that returns text/plain mime type
https://raw.githubusercontent.com/bdalina54/bdalina54.github.io/master/assets/js/terebra/acrior.js
<script src="https://raw.githubusercontent.com/bdalina54/bdalina54.github.io/master/assets/js/terebra/acrior.js"></script>
And this is the live version
https://bdalina54.github.io/assets/js/terebra/acrior.js
<script src="https://bdalina54.github.io/assets/js/terebra/acrior.js"></script>
You can check my screenshot how I did it
https://prnt.sc/obbrpn
https://prnt.sc/obbt69
https://prnt.sc/obbskb
After enabling GitHub pages of your Repository, use following link:
<script src="https://[username].github.io/[repository]/[filename].js"></script>
This should work:
<script src="https://raw.github.com/[username]/[repository]/[branch]/[filename].js"></script>
Here is how you can get redirected to the needed address in github:
This works even with github's recent change:
<script>
$.getScript("https://raw.github.com/username/repo/master/src/script.js");
</script>
PS. requires jQuery.
Try somethig like this:
<html>
<head>
<script src="https://raw.github.com/e0ne/BlogSamples/master/ModalDialog/AdvancedPopup/jquery.min.js"></script>
</head>
It's working for me