Created
June 9, 2020 20:02
-
-
Save tgirardi/fc579f3312e9cfb29d800acea6706957 to your computer and use it in GitHub Desktop.
This file contains 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
// 1. Go to your linkedin post and load all comments | |
// 2. Open your browser's web development tools and paste this on the console. | |
// 3. Replace the reply message with your own | |
// 4. then run: | |
// * reply() to reply the current comment (highlighted in yellow) | |
// * next() to skip that comment | |
// * autoreply() to reply all automatically (it takes about 15 seconds to reply to each comment, | |
// but you can adjust the period variable if you want to try to do it faster - some replies could fail to post) | |
// Use at your own risk. There's no warranty linkedin will not block you if you abuse this tool | |
var MESSAGE = ''; | |
var PERIOD = 5000; | |
var cursor = document.querySelector('.comments-comments-list__comment-item') | |
var count = 0; | |
function next() { | |
if(count) { | |
cursor = cursor.nextElementSibling; | |
} | |
cursor.style.backgroundColor = 'yellow'; | |
cursor.scrollIntoView(); | |
++count; | |
} | |
function reply() { | |
cursor.querySelector('[data-control-name="reply"]').click(); | |
window.setTimeout(function () { | |
cursor.querySelector('[data-control-name="reply_box"] [contenteditable="true"] > p').textContent = MESSAGE; | |
window.setTimeout(function () { | |
cursor.querySelector('.comments-comment-box__submit-button').click(); | |
next(); | |
}, PERIOD); | |
}, PERIOD) | |
} | |
function autoreply() { | |
window.setInterval(reply, PERIOD * 3); | |
} | |
next(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment