Skip to content

Commit

Permalink
Fix checkstyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
taldekar committed Feb 14, 2025
1 parent ceda64d commit 4d9b341
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ private String generateCss() {
mask-position: center;
scale: 60%;
}
.mynah-button.mynah-button-secondary.fill-state-always.code-snippet-close-button.mynah-ui-clickable-item
.mynah-button.mynah-button-secondary.fill-state-always.code-snippet-close-button
.mynah-ui-clickable-item
.mynah-ui-icon-cancel {
-webkit-mask-size: 187.5% !important;
mask-size: 187.5% !important;
Expand Down Expand Up @@ -310,7 +311,8 @@ private String generateJS(final String jsEntrypoint) {
const textarea = document.querySelector('textarea.mynah-chat-prompt-input');
if (textarea) {
textarea.addEventListener("keydown", (event) => {
if (((isMacOs() && event.metaKey) || (!isMacOs() && event.ctrlKey)) && event.key === 'a') {
if (((isMacOs() && event.metaKey) || (!isMacOs() && event.ctrlKey))
&& event.key === 'a') {
textarea.select();
event.preventDefault();
event.stopPropagation();
Expand Down Expand Up @@ -339,12 +341,16 @@ private String generateJS(final String jsEntrypoint) {
mutation.addedNodes.forEach((node) => {
if (node.nodeType === 1) { // Check if it's an element node
// Check for direct match
if (node.matches('.mynah-button.mynah-button-secondary.mynah-button-border.fill-state-always.mynah-chat-item-followup-question-option.mynah-ui-clickable-item')) {
if (node.matches('.mynah-button.mynah-button-secondary
.mynah-button-border.fill-state-always.mynah-chat-item-followup-question-option
.mynah-ui-clickable-item')) {
attachEventListeners(node);
}
// Check for nested matches
const buttons = node.querySelectorAll('.mynah-button.mynah-button-secondary.mynah-button-border.fill-state-always.mynah-chat-item-followup-question-option.mynah-ui-clickable-item');
const buttons = node.querySelectorAll('.mynah-button.mynah-button-secondary
.mynah-button-border.fill-state-always.mynah-chat-item-followup-question-option
.mynah-ui-clickable-item');
buttons.forEach(attachEventListeners);
}
});
Expand Down

0 comments on commit 4d9b341

Please sign in to comment.