sS hjs_autoExpandingTextAreas() { ret hjs([[ var autoExpandTextArea = function (field) { field.style.height = "1px"; // Get the computed styles for the element var computed = window.getComputedStyle(field); var h = field.scrollHeight + parseInt(computed.getPropertyValue('border-top-width')) + parseInt(computed.getPropertyValue('border-bottom-width')); field.style.height = h + 'px'; }; document.addEventListener('input', function (event) { if (event.target.tagName.toLowerCase() !== 'textarea') return; if (!event.target.classList.contains("auto-expand")) return; autoExpandTextArea(event.target); }, false); ]]); }