Last active
March 12, 2024 08:13
-
-
Save FredrikWendt/52abadf938dcbd59900652b823b01185 to your computer and use it in GitHub Desktop.
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
window.addEventListener('keydown', function(event) { | |
if ((event.metaKey || event.ctrlKey) && event.key === 'Enter') { | |
let buttons = document.getElementsByClassName("uiButton"); | |
for (let i = 0; i < buttons.length; i++) { | |
let button = buttons[i]; | |
if (button.attributes && button.attributes["data-selenium-test"]) { | |
if (button.attributes["data-selenium-test"].value === "UniversalSaveBar-button-primary") { | |
button.click(); | |
break; | |
} | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Activate when the URL matches this regexp:
https://app.hubspot.com/contacts/(\d+)/record/