Skip to content

Instantly share code, notes, and snippets.

@FredrikWendt
Last active March 12, 2024 08:13
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 FredrikWendt/52abadf938dcbd59900652b823b01185 to your computer and use it in GitHub Desktop.
Save FredrikWendt/52abadf938dcbd59900652b823b01185 to your computer and use it in GitHub Desktop.
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;
}
}
}
}
});
@FredrikWendt
Copy link
Author

Activate when the URL matches this regexp: https://app.hubspot.com/contacts/(\d+)/record/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment