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

159
Visualizações
Chrome Extension Tab Deleting Not Working

Ok, So I was working on deleting tabs with a Chrome Extension, but it's not working. Here's my code for each file.

backround.js

chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.executeScript(tab.id, {file: "bookmarklet.js"})

});

bookmarklet.js

if (window.location.href.indexOf("unblocked", "games", "1v1", "smash carts", "slope unblocked", "retrobowl",) > -1) {
alert("You are not supposed to be on the website. You will be reported to an adminstrator immediatly.");
console.log(window.location.href)
chrome.tabs.getCurrent(function(tab) {
    chrome.tabs.remove(tab.id, function() { });
});

}else { console.log("This Website is Safe") }enter code here

My question is, how am I supposed to get the chrome. tab. remove function to work? Also my mainfest.json includes the tab permissions.

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