Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

169
Vistas
chrome extension get a table from open tabs and show them in new html page

I'm developing a chrome extension to get a table from two open tab and show them in one new tab. Up to now, the following extension gets the table from one tab, but shows the result in the popup.html, how could I show it in a new tab?

manifest.json:

{
"name": "Tables",
"description": "Tables",
"version": "1.0",
"manifest_version": 2,
"permissions": ["tabs", "<all_urls>"],
"browser_action": {
  "default_popup": "popup.html"
}
}

popup.html:

<!DOCTYPE HTML>
<html>
<head></head>
<title></title>
<body>
<div id="contentId">-</div>
<script type="text/javascript" src="popup.js"></script>
</body>
</html>

popup.js:

function table_content (results){
contents = results;
document.querySelector("#contentId").innerHTML = "<div>" + contents + "</div>";}
chrome.tabs.query({active: true}, function(tabs) {
var tab = tabs[0];
chrome.tabs.executeScript(tab.id, {
code: 'document.getElementById("appointmentTable").innerHTML'
}, table_content);
});
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda