Created
December 21, 2020 20:47
-
-
Save lucaslgr/ad4d320fa43a8a5da9d710b66d842975 to your computer and use it in GitHub Desktop.
Only a linkedin simple script to expand your network
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function conectOneMore() { | |
var nToConnect = document.querySelectorAll('button[aria-label^="Conecte-se"]').length; | |
console.log('Número para se conectar: ' + nToConnect); | |
var nToFollow = document.querySelectorAll('button[aria-label^="Seguir"]').length; | |
console.log('Número para seguir: ' + nToFollow); | |
if (nToConnect > 0) { | |
setTimeout(() => { | |
if (document.querySelector('button[aria-label^="Conecte-se"]')) | |
document.querySelector('button[aria-label^="Conecte-se"]').click(); | |
setTimeout(() => { | |
if (document.querySelector('button[aria-label^="Enviar agora"]')) | |
document.querySelector('button[aria-label^="Enviar agora"]').click(); | |
conectOneMore(); | |
}, (Math.random() * 10000) + 200); | |
}, Math.random() * 15000) | |
} else if (nToFollow > 0) { | |
if (nToFollow > 0) { | |
setTimeout(() => { | |
if (document.querySelector('button[aria-label^="Seguir"]')) | |
document.querySelector('button[aria-label^="Seguir"]').click(); | |
conectOneMore(); | |
}, Math.random() * 15000) | |
} | |
return; | |
} else { | |
// window.scrollTo(0, document.body.scrollHeight); | |
window.scrollTo(0,window.innerHeight); | |
if(window.innerHeight == window.scrollY){ | |
if(document.querySelector('button[aria-label^="Avançar"]')) | |
document.querySelector('button[aria-label^="Avançar"]').click(); | |
} | |
setTimeout(() => { | |
conectOneMore(); | |
}, Math.random() * 5000 + 5000) | |
} | |
} | |
conectOneMore(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment