Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

132
Visualizações
Chrome extension content loads only for a split second

I'm developing a chrome extension that involves adding a column to a table, however aside from the header the changes only load for a second before they get overridden. My changes also activate after a button within the website is pressed to load the table, but the changes always only ever take place the 2nd time the button is pressed, but never the first.

manifest.json

    "name": "Better Registration",
    "description": "Registration Page",
    "version": "1.0",
    "manifest_version": 3,
    "content_scripts": [
        {
            "matches": ["*://*.registrationssb.ucr.edu/*"],
            "js": ["content.js"],
            "run_at": "document_end"
        }
    ]
}

content.js

var run = document.getElementById("search-go");
if(run){
    run.addEventListener("click", load);
    
}


function load(){
    console.log("LOAD PAGE");
    var table = document.getElementById("table1");
    if(table != null){
        var row = table.rows[0];
        var cell = row.insertCell(9);
        cell.innerHTML = "PLACEMENT HEADER";
        for(let i = 1; i < table.rows.length; i++){
            var cell = table.rows[i].insertCell(9);
            cell.innerHTML = "PLACEMENT TEXT";
            
        }
    }
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda