Created
October 8, 2024 13:21
-
-
Save iurev/4a9260800072d6e6b0cd4066c01a26ee to your computer and use it in GitHub Desktop.
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
document.addEventListener('keydown', function(event) { | |
// Check if Ctrl+Y is pressed | |
if (event.ctrlKey && event.key === 'y') { | |
event.preventDefault(); // Prevent the default browser behavior | |
// Find the element with data-element-id="voice-input-button" | |
var voiceInputButton = document.querySelector('[data-element-id="voice-input-button"]'); | |
// If the element exists, click it | |
if (voiceInputButton) { | |
voiceInputButton.click(); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment