Skip to content

Instantly share code, notes, and snippets.

@BrittonWinterrose
Created February 2, 2019 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrittonWinterrose/c199e964f36edba9369155bee7881b0f to your computer and use it in GitHub Desktop.
Save BrittonWinterrose/c199e964f36edba9369155bee7881b0f to your computer and use it in GitHub Desktop.
Linkedin Message - Auto Archive / Auto Delete
//// LINKEDIN INBOX AUTOMATION /////
// How to use it //
// 1. Go to the LinkedIn messages screen.
// 2. Open up your Chrome Console
// 3. Paste either of the following scripts into the console and hit enter/return to run.
// ARCHIVING SCRIPT
;(function () {
setInterval(() => {
let archived = false;
$('artdeco-dropdown-item').each((i, elem) => {
let txt = $(elem).text().trim();
if (txt === 'Archive') {
archived = true;
$(elem).click();
}
});
if (archived){
$('.msg-conversation-card__list-action-icon').eq(1).click();
}
}, 100);
}());
// DELETING SCRIPT
;(function () {
setInterval(() => {
let deleted = false;
$('artdeco-dropdown-item').each((i, elem) => {
let txt = $(elem).text().trim();
if (txt === 'Delete') {
deleted = true;
$(elem).click();
}
});
if (deleted){
setTimeout(() => $('.js-msg-delete').click(), 500)
} else {
$('.msg-conversation-card__list-action-icon').eq(1).click();
}
}, 1000);
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment