Created
November 17, 2025 08:26
-
-
Save kouk/137f98913c7168e6096916a8c8fca8c4 to your computer and use it in GitHub Desktop.
manage_linkedin_conversations.js
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
| // const timer = ms => new Promise(res => setTimeout(res, ms)); | |
| async function manage_linkedin_conversations(action, times) { | |
| for (var i = 0; i < times; i++) { | |
| await Promise.all([...document.querySelectorAll("label[aria-label^='Select conversation']")].map((el) => {return el.click()})); | |
| await timer(1000); | |
| var btn = document.querySelector('button[aria-label="' + action + '"]'); | |
| if (btn ) { | |
| await btn.click(); | |
| await timer(1000); | |
| } else { | |
| break; | |
| } | |
| } | |
| }; | |
| // manage_linkedin_conversations("Archive", 5); | |
| // manage_linkedin_conversations("Restore", 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment