Skip to content

Instantly share code, notes, and snippets.

@JustinShenk
Last active May 12, 2019 11:22
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 JustinShenk/d93af0c0be8a40776d0e1bb31e023526 to your computer and use it in GitHub Desktop.
Save JustinShenk/d93af0c0be8a40776d0e1bb31e023526 to your computer and use it in GitHub Desktop.
Click the first reaction in an open Slack channel
// How to use: open Console (View -> Developer -> Developer Tools -> Console)
// and paste one of the following:
/**
* Agree with ~first~ reaction in active Slack channel, poll every 10 seconds.
**/
function clickFirstReaction() {
$("div.c-reaction_bar > button:nth-child(1):not(.c-reaction--reacted)").click()
}
var timerID = setInterval(clickFirstReaction, 10000);
// -- //
/**
* Agree with ~every~ reaction in active Slack channel, poll every 10 seconds.
**/
function clickEveryReaction() {
$("div > button.c-button-unstyled.c-reaction:not(.c-reaction--reacted) > span.emoji-outer.emoji-sizer").click()
}
var timerID = setInterval(clickEveryReaction, 10000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment