Files
haproxy-dashboard/static/js/edit.js
Mateusz Gruszczyński ca0ebd6816 redactor
2025-11-01 21:58:55 +01:00

11 lines
315 B
JavaScript

// edit.js — drobne UX dla edytora
(() => {
'use strict';
const ta = document.getElementById('haproxy_config');
if (!ta) return;
// Auto-grow (simple)
const auto = () => { ta.style.height = 'auto'; ta.style.height = (ta.scrollHeight + 6) + 'px'; };
ta.addEventListener('input', auto);
auto();
})();