title: Tesseract.js offline: ReferenceError: Tesseract is not defined
body: <p>I have created a local web-page and I will use default Tesseract.js (copied from CDN tesseract.js, worker.js, eng.traineddata.gz, index.js).
  Here is the code I use:</p>
  
  <p>In head:</p>
  
  <pre><code>&lt;script scr="js/tesseract.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      //Set the worker, core and lang to local files
      (function() {
      var path = (function() { //absolute path
      var pathArray = window.location.pathname.split( '/' );
      pathArray.pop(); //Remove the last ("**.html")
      return window.location.origin + pathArray.join("/");
      })();
      console.log(path);
  
      window.Tesseract = Tesseract.create({
      workerPath: path + '/js/worker.js',
      langPath: path + '/js/eng.traineddata.gz',
      corePath: path + '/js/index.js'
      });
      })();
  &lt;/script&gt;
  </code></pre>
  
  <p>Code that runs on the button :</p>
  
  <pre><code>var img = document.getElementById('UploadAndPreview');
      Tesseract.recognize(img)
      .progress(function(result) {
              document.getElementById("ocr_status")
                      .innerText = result["status"] + " (" +
                          (result["progress"] * 100) + "%)";
      })
      .then(function(result){
          console.log('Something is going on');
          console.log(result);
      })
  </code></pre>
  
  <p>After I open the page locally in browser, I get an error:</p>
  
  <pre><code>ReferenceError: Tesseract is not defined
  </code></pre>
  
  <p>What to do to fix it? </p>