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

74
Views
¿Cómo inyectar secuencias de comandos en línea cuando la política de seguridad de contenido lo impide?

Estoy usando Chrome Extension ReactJS , que me gustaría insertar esto en popup.html :

 <script src="https://unpkg.com/ringcentral-c2d@1.0.0/build/index.js"></script> <script> window.clickToDialInject = new RingCentralC2D(); window.clickToDialInject.on( RingCentralC2D.events.call, function (phoneNumber) { console.log('Click To Dial:', phoneNumber); chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => { const currentTabId = tabs[0].id; chrome.tabs.sendMessage(currentTabId, { clickToCall: phoneNumber }); }); // alert('Click To Dial:' + phoneNumber); } ); window.clickToDialInject.on( RingCentralC2D.events.text, function (phoneNumber) { console.log('Click To SMS:', phoneNumber); chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => { const currentTabId = tabs[0].id; chrome.tabs.sendMessage(currentTabId, { clickToSMS: phoneNumber }); }); // alert('Click To SMS:' + phoneNumber); } ); </script>

Tengo este error en la consola. Ya probé la etiqueta meta pero no puedo averiguar qué directiva debo usar.

ingrese la descripción de la imagen aquí

En este momento, solo funciona si pego directamente el script desde https://unpkg.com/ringcentral-c2d@1.0.0/build/index.js dentro de popup.jsx , pero no es la forma adecuada.

¿Cómo podría superar esto?

about 4 years ago · Juan Pablo Isaza
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!