Skip to content

Instantly share code, notes, and snippets.

@hprobotic
Created March 27, 2020 07:01
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 hprobotic/b0fead9db29a49fcbee205322ac8c7d1 to your computer and use it in GitHub Desktop.
Save hprobotic/b0fead9db29a49fcbee205322ac8c7d1 to your computer and use it in GitHub Desktop.
javascript: (() => {
const toggle = tip => ({ key }) =>
key === ' ' && document.querySelectorAll('[data-tooltip]').forEach(el => el.dataset.tooltip.includes(tip) && el.click());
document.body.onkeyup = toggle('Turn off microphone');
document.body.onkeydown = toggle('Turn on microphone');
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment