Last active
August 20, 2019 21:51
-
-
Save RayBB/43450af4d8ed4a0a996306d5c6641e70 to your computer and use it in GitHub Desktop.
Automatically clicks the show new messages button for unread tab in slack
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
// Works on pages such as: https://app.slack.com/client/*********/unreads/ | |
/* | |
Basically just clicks the "X New Messages" button when it pops up :) | |
*/ | |
setInterval(function(){ | |
let newMessageButton = [...document.querySelectorAll('button')] | |
.filter(txt => txt.innerHTML.toLowerCase() | |
.includes('new message'))[0] | |
if (newMessageButton != null) { | |
newMessageButton.click(); | |
} | |
}, 3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment