Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

104
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda