title: Hotlink resources like JavaScript files directly from GitHub
body: <p>I asked a <a href="https://stackoverflow.com/q/14033281/1420197">question about including resources from GitHub</a> and the answer was to use the raw link:</p>
  
  <pre><code>https://raw.github.com/username/repository/branch/file.js
  </code></pre>
  
  <p>I am trying to include a script using:</p>
  
  <pre><code>&lt;script
     type="text/javascript"
     src="https://raw.github.com/username/repo/master/src/file.js"
  &gt;&lt;/script&gt;
  </code></pre>
  
  <p>but I get the following error:</p>
  
  <blockquote>
    <p>Refused to execute script from '<a href="https://raw.github.com/username/repo/master/src/file.js" rel="noreferrer">https://raw.github.com/username/repo/master/src/file.js</a>' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.</p>
  </blockquote>
  
  <p>Are there any alternatives to fix this error?</p>
  
  <h2>Usage example</h2>
  
  <p>I don't use this in the production but for a demo page:</p>
  
  <pre><code>project-repository-from-github
    ├─ master
    │   ├─ src
    │   │   └─ my-jQuery-plugin.js
    │   └─ README.md
    └─ gh-pages
        ├─ css
        │   └─ style.css
        └─ index.html
  </code></pre>
  
  <p>In the index.html page I want to have the latest build of my-jQuery-plugin.js. So, I would include the raw URL to the script.</p>
  
  <p>How do I fix the error?</p>