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

134
Views
Redirección incorrecta en js

Hola, estoy tratando de hacer una extensión de Chrome y estoy atascado en el punto en que el script me redirige al sitio equivocado.

manifiesto.json

 "name": "Popup ", "manifest_version": 2, "version": "0.1", "description": "Search for something", "browser_action": { "default_icon": "questionn.png", "default_popup": "popup.html" }, "permissions": [ "tabs", "http://*/*", "https://*/*" ] }

ventana emergente.html

 <html> <head> <script src="popup.js"></script> <style type="text/css" media="screen"> body { min-width: 250px; text-align: center; } #click-me { font-size: 15px; } </style> </head> <body> <input type="text" id="rest"> <button id='click-me'>Click Me! </button> </body> </html>

emergente.js

 function clickHandler(e) { chrome.tabs.create({ url: "www.youtube.com/watch?v=" + document.getElementById('rest').value }); window.close(); // Note: window.close(), not this.close() } document.addEventListener('DOMContentLoaded', function () { document.getElementById('click-me').addEventListener('click', clickHandler); });

Cuando agrego "cCoed5Oo_J4" en el cuadro de búsqueda, me redirige a "chrome-extension://lldddgdjlmoagiokneclpnhbcamggdnf/www.youtube.com/watch?v=cCoed5Oo_J4" en lugar del sitio correcto. ¿Pueden por favor ayudarme en eso?

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!