Last active
October 21, 2021 08:18
-
-
Save MicahZoltu/6946096153eb20ce16a50bb2de16dbb2 to your computer and use it in GitHub Desktop.
Reaction Hotkey for various chat clients.
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
window.addEventListener('keydown', event => { | |
if (!event.shiftKey || !event.ctrlKey || event.key != '|') return | |
const container = document.querySelector('main > div:first-of-type > div:first-of-type > div:first-of-type > ol > li:last-of-type > div') | |
container.dispatchEvent(new MouseEvent('mousemove', { bubbles: true })); | |
container.querySelector('div[aria-label="Add Reaction"]').click() | |
}) |
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
window.addEventListener('keydown', event => { if (event.shiftKey && event.ctrlKey && event.key == '|') { document.querySelector('.messages-box > .wrapper > ul > li:last-of-type > .message-actions > .message-actions__buttons > .message-actions__button').click(); document.querySelector('.emoji-picker > .emoji-top > .rc-input > .rc-input__label > .rc-input__wrapper > input.rc-input__element').focus(); document.querySelector('.emoji-picker > .emoji-top > .rc-input > .rc-input__label > .rc-input__wrapper > input.rc-input__element').value = '' } }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment