Created
February 2, 2019 20:48
-
-
Save BrittonWinterrose/c199e964f36edba9369155bee7881b0f to your computer and use it in GitHub Desktop.
Linkedin Message - Auto Archive / Auto Delete
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
//// 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