Skip to content

Instantly share code, notes, and snippets.

@mehmetkurt
Last active December 1, 2022 17:47
Show Gist options
  • Save mehmetkurt/49b27fab6b43bcb76c15105d609e309d to your computer and use it in GitHub Desktop.
Save mehmetkurt/49b27fab6b43bcb76c15105d609e309d to your computer and use it in GitHub Desktop.
LinkedIn.com Remove All Messages : LinkedIn.com Hack
/*
Open Chrome Developer Tools
Select Console Tab
Paste the following code
and press the Enter!
Subscribe Youtube Channel : https://www.youtube.com/codeislifes
*/
var removeMessages = function () {
let messageListContainer = document.querySelector('.msg-conversations-container__conversations-list.list-style-none.ember-view');
messageListContainer.scrollTo(0, messageListContainer.scrollHeight);
try {
$(".msg-thread__topcard-btn--icon").click();
setTimeout(function () {
$(".msg-topcard__full-width-action-button.delete").click();
setTimeout(function () {
$(".confirm-delete-btn").click();
setTimeout(function () {
removeMessages();
}, 300);
}, 300);
}, 300);
} catch (err) {
setTimeout(function () {
removeMessages();
}, 1000);
}
};
removeMessages();
@mehmetunal
Copy link

Thank you very much for the search of such a script. Good work

@chrishough
Copy link

VM492:3 Uncaught TypeError: Cannot read properties of null (reading 'scrollTo')
    at removeMessages (<anonymous>:3:26)
    at <anonymous>:23:1```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment