Server : Apache System : Linux webd348.cluster026.gra.hosting.ovh.net 5.15.148-ovh-vps-grsec-zfs-classid #1 SMP Thu Feb 8 09:41:04 UTC 2024 x86_64 User : hednacluml ( 122243) PHP Version : 8.3.9 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Directory : /home/hednacluml/enfants/plugins-dist/porte_plume/javascript/ |
function barre_forcer_hauteur () { jQuery(".markItUpEditor", this == window ? null : this).each(function() { var hauteur_min = jQuery(this).height(); var hauteur_max = parseInt(jQuery(window).height()) - 200; var hauteur = hauteur_min; var signes = jQuery(this).val().length; if (signes){ /* en gros: 400 signes donnent 100 pixels de haut */ var hauteur_signes = Math.round(signes / 4) + 50; if (hauteur_signes > hauteur_min && hauteur_signes < hauteur_max) { hauteur = hauteur_signes; } else { if (hauteur_signes > hauteur_max) { hauteur = hauteur_max; } } jQuery(this).height(hauteur); } }); } jQuery(window).on("load", function() { barre_forcer_hauteur(); onAjaxLoad(barre_forcer_hauteur); });