Link and execute external JavaScript file hosted on GitHub
Asked 07 September, 2021
Viewed 1.8K times
  • 51
Votes

When I try to change the linked reference of a local JavaScript file to a GitHub raw version my test file stops working. The error is:


  

Refused to execute script from ... because its MIME type (text/plain) is not executable, and strict MIME type checking is enabled.

Is there a way to disable this behavior or is there a service that allows linking to GitHub raw files?

Working code:

<script src="bootstrap-wysiwyg.js"></script>

Non-working code:

<script src="https://raw.github.com/mindmup/bootstrap-wysiwyg/master/bootstrap-wysiwyg.js"></script>

15 Answer