Skip to content

Instantly share code, notes, and snippets.

@tkambler
Created April 4, 2022 14:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkambler/bed5545cf1a39b374e0235cb081acb6a to your computer and use it in GitHub Desktop.
Save tkambler/bed5545cf1a39b374e0235cb081acb6a to your computer and use it in GitHub Desktop.
Script for bulk-selecting multiple messages on LinkedIn (for deletion)
/**
* 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