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

116
Views
La extensión de Chrome no envía la solicitud

Estoy tratando de crear una extensión de Chrome donde, cuando se presiona el botón, envía una solicitud. Esto funciona bien cuando lo intento usando un formato de sitio web. Sin embargo, cuando lo convierto en una extensión de Chrome, no funciona. Aquí está mi ventana emergente.js

 function myFunction() { var x = document.getElementById("inp").value; /*console.log(x)*/ const req = new XMLHttpRequest(); const url='https://*****.****.**/doctorapi/'+x; /*console.log(url)*/ req.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { //The responseText property //returns a text string document.getElementById('answer').innerHTML= req.responseText; //Do some stuff } }; req.open("GET", url, true); req.send(); }

y mi manifiesto.json

 { "name": "DoctorBotTheExtension", "description": "DoctorBot Web API fit into an extension", "version": "1.0", "manifest_version": 3, "background": { "service_worker": "background.js" }, "permissions": ["storage","webRequest"], "action": { "default_popup": "popup.html", "default_icon": { "16": "/images/icon16x16.png", "32": "/images/icon32x32.png", "48": "/images/icon48x48.png", "128": "/images/icon128x128.png" } }, "icons": { "16": "/images/icon16x16.png", "32": "/images/icon32x32.png", "48": "/images/icon48x48.png", "128": "/images/icon128x128.png" } }

Cuando ejecuto esto, mi servidor web no recibe ninguna solicitud. ¿Cómo puedo solucionar 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!