Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

106
Views
Not able to load tesseract.js on my chrome extension

I am trying to make a chrome extension that takes screenshots and the idea is to pass it through tesseract.js

But while I am using CDN script tag

<script src='https://unpkg.com/tesseract.js@v2.1.0/dist/tesseract.min.js'></script>

I am getting this error: error.png

Refused to load the script 'https://unpkg.com/tesseract.js@v2.1.0/dist/tesseract.min.js' because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem:". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

Any suggestion what I need to do? I dont want to use npm method.

Do I need to add content_security_policy to my manifest.json file? If Yes, then what?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Refer the screenshot from manifest.json

You can use the tesseract.min.js file as the content script in manifest.json. Now, perform the Tesseract related tasks in the separate content.js file which is invoked on click of the button in popup.html.

Since we are using tesseract file as the content script hence the tesseract variables are available for the invoked content script and hence we can successfully perform all the tesseract related operations in this file.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!