title: Including JavaScript files from GitHub into HTML pages
body: <blockquote>
    <h1>PAY ATTENTION!</h1>
    
    <p><strong>You can't include Github scripts directly from Github</strong> after <a href="https://github.com/blog/1482" rel="noreferrer"><strong>this change</strong></a>.</p>
    
    <p>We added the <code>X-Content-Type-Options: nosniff</code> header to our raw URL responses way back in 2011 as a first step in combating hotlinking. This has the effect of forcing the browser to treat content in accordance with the <code>Content-Type</code> header. That means that when we set <code>Content-Type: text/plain</code> for raw views of files, the browser will refuse to treat that file as JavaScript or CSS.</p>
    
    <p>But there are alternatives. <strong>Check <a href="https://stackoverflow.com/a/20311329/1420197">my answer to this question</strong></a>.</p>
  </blockquote>
  
  <hr>
  
  <p>I am trying to include a JavaScript file from GitHub into a local HTML file for testing (like an image found on the internet: <code>&lt;img src="http://..."&gt;</code>). </p>
  
  <p>I would like something like this:</p>
  
  <pre><code>&lt;script src="https://github.com/[username]/[repository]/blob/master/public/[fileName].js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>The problem is that this doesn't work.</p>
  
  <p>How can I do this?</p>