edit: background.js
chrome.browserAction.onClicked.addListener(function(tab){
chrome.tabs.create({active: true, url: 'https://www.sine.com.br/vagas-empregos-em-contagem-mg'}, function(){
console.log('criada');
});
});
chrome.tabs.executeScript({
file: "execute.js"
});
execute.js
setInterval(() => {
var vagasList = document.querySelector('.jobs').childNodes;
n = [];
vagasList.forEach(element => {
if(element.nodeName != '#text') {
var enfia = n.push(element.children[0].children[1].href);
var ind = n.indexOf(element);
if (ind > 2) {
n.splice(ind);
}
}
});
n.forEach(element => {
console.log(element);
open(element);
vagas = setInterval(function(){
document.querySelector('.pnl-candidatar').children[0].click();
console.log('ok');
}, 1000);
});
}, 5000 );