PluginProbe
MxChat – AI Chatbot & Content Generation for WordPress / 2.0.7
MxChat – AI Chatbot & Content Generation for WordPress v2.0.7
3.2.21 3.2.20 3.2.19 3.2.18 3.2.17 3.2.16 3.2.15 3.2.14 3.2.12 3.2.13 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 3.2.6 3.2.5 3.2.4 3.2.3 3.2.2 3.2.1 2.0.3 2.0.4 2.0.5 2.0.6 All 152 releases
← All changes | js/mxchat-admin.js +19 -0 2.0.42.0.7 View file →
@@ -336,8 +336,9 @@
336 336 // Initialize all toggle visibility buttons
337 337 [
338 338 '#toggleApiKeyVisibility',
339 339 '#toggleWooCommerceSecretVisibility',
340 + '#toggleVoyageAPIKeyVisibility',
340 341 '#toggleLoopsApiKeyVisibility',
341 342 '#toggleXaiApiKeyVisibility',
342 343 '#toggleClaudeApiKeyVisibility',
343 344 '#toggleBraveApiKeyVisibility',
@@ -543,8 +544,26 @@
543 544 window.mxchatSaveSetting('live_agent_status', this.checked ? 'on' : 'off');
544 545 }
545 546 });
546 547 }
548 +
549 + // Function to adjust the textarea height to content
550 + function adjustTextareaHeight() {
551 + this.style.height = 'auto'; // Reset to auto to calculate scrollHeight
552 + this.style.height = this.scrollHeight + 'px'; // Expand to content height
553 + }
554 +
555 + // Function to reset the textarea height to initial
556 + function resetTextareaHeight() {
557 + this.style.height = ''; // Remove inline height, reverting to CSS default
558 + }
559 +
560 + // Target the specific textarea by ID
561 + var $textarea = $('#system_prompt_instructions');
562 +
563 + // Bind events
564 + $textarea.on('focus input', adjustTextareaHeight) // Expand on focus and input
565 + .on('blur', resetTextareaHeight); // Reset on blur
547 566
548 567
549 568 });
550 569