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

197
Views
No se puede agregar un nuevo elemento al menú contextual en Chrome (manifiesto 3)

Tuve algunas dificultades durante la migración del Manifiesto 3 al Manifiesto 3: nada funciona. Desarrollé una extensión de Chrome simple que agrega un nuevo elemento en el menú contextual, para que pueda buscar el texto insertado en algún sitio web. Funciona correctamente en el manifiesto 2, pero no en el 3ro. Entonces hay un código de manifiesto (3)

 { "manifest_version": 3, "name": "name", "short_name": "shortN", "description": "This extension will work someday I hope so", "background": [{ "service_worker": [ "background.js" ] }], "icons": { "128": "icons/128.png", "48": "icons/48.png", "32": "icons/32.png", "16": "icons/16.png" }, "permissions": [ "contextMenus", "tabs", "activeTab" ], "version": "1.3" }

Y una muestra de código de fondo

 chrome.runtime.onInstalled.addListener(function() { chrome.contextMenus.create({ title: "title", contexts: ["selection"], id: "title1" }); }); chrome.contextMenus.onClicked.addListener(function (info, tab) { if (info.menuItemId === "title1") { let getToSite = "https://*" + info.selectionText chrome.tabs.create({index: tab.index + 1, url: getQ, selected: true}); } })

¿Alguien puede echarle un vistazo y decir qué s wrong with it? I También s wrong with it? I nuevo en JS (como, hace tres días), así que aprecio las explicaciones simples. ¡Gracias!

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!