NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Seguir Perfis no LinkedIn
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Ferramenta para seguir perfis automáticamente no instagram!
// @author Ergildo C. Dias
// @license GPL-3.0-or-later; http://www.gnu.org/licenses/gpl-3.0.txt
// @match https://www.linkedin.com/search/results/people*
// @include https://www.linkedin.com/search/results/people*
// @grant none
// ==/UserScript==
(function () {
'use strict';
var pnlButton = document.createElement("span");
var btnSeguirPerfis = document.createElement("BUTTON");
btnSeguirPerfis.setAttribute('id', 'btnSeguirPerfis');
btnSeguirPerfis.style.margin = '2px';
var textSeguirPerfis = document.createTextNode("Seguir Perfis");
btnSeguirPerfis.appendChild(textSeguirPerfis);
pnlButton.style.margin = '5px';
pnlButton.style.position = 'absolute';
pnlButton.style.top = '0';
pnlButton.style.zIndex = '4000';
btnSeguirPerfis.onclick = function () {
var linkSeguidores = document.getElementsByClassName('search-result__occluded-item');
for(var i=0; i<linkSeguidores.length; i++){
var persoLocation = linkSeguidores[i].getElementsByClassName('subline-level-2')[0];
if(persoLocation && persoLocation.textContent.trim().indexOf('Ireland') !== -1){
console.log( linkSeguidores[i]);
var btnNonnect = linkSeguidores[i].getElementsByClassName('search-result__actions--primary')[0];
if(btnNonnect){
// console.log(btnNonnect);
var btnText = btnNonnect.textContent.trim();
if(btnText === 'Connect'){
setTimeout(function(){
btnNonnect.click();
var modalContainer = document.getElementById('li-modal-container');
var btnCancel = modalContainer.getElementsByClassName('send-invite__cancel-btn')[0];
setTimeout(function(){
btnCancel.click();
},1000);
console.log(modalContainer);
console.log(btnCancel);
},1000);
}
}
}
}
};
document.body.appendChild(pnlButton);
pnlButton.appendChild(btnSeguirPerfis);
function sleep(btnCancel) {
var delay = 4000;
var start = new Date().getTime();
while (new Date().getTime() < start + delay);
}
})();