Created
April 4, 2022 14:38
-
-
Save tkambler/bed5545cf1a39b374e0235cb081acb6a to your computer and use it in GitHub Desktop.
Script for bulk-selecting multiple messages on LinkedIn (for deletion)
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
/** | |
* Open the floating messages panel in the bottom right-hand corner of the LinkedIn screen. Click | |
* the three dots and select "Manage messages." Scroll down the page a few times so as to load several | |
* screens of messages (but not too many). The paste the following script into the developer console | |
* and press enter. | |
* | |
* All of the messages on your screen should now be selected. You can choose the "Delete" option to delete | |
* all of them in bulk. | |
*/ | |
(() => { | |
const messages = [ | |
...document.querySelectorAll('.msg-conversation-listitem__link') | |
]; | |
console.log(`Found ${messages.length.toLocaleString()} messages.`); | |
for (const message of messages) { | |
const checkbox = message.querySelector('.msg-selectable-entity__checkbox-container'); | |
checkbox.click(); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment