I'm trying to run simple script using stack snippets:
var img = document.getElementsByTagName('img')[0];
Tesseract.recognize(img, function(err, result) {
console.log(result);
});
<script src="http://tenso.rs/tesseract.js" crossorigin="anonymous"></script>
<img src="https://www.w3.org/TR/SVGTiny12/examples/textArea01.png"/>
But got error: Uncaught ReferenceError: Tesseract is not defined
, why? when I open http://tenso.rs/tesseract.js it redirect to https://cdn.rawgit.com/naptha/tesseract.js/master/lib/Tesseract.2015.07.26.js and there is the code, but when I include that file instead I got unknown error Script Error
because of cross origin. How to resolve this?