<script>
document.addEventListener('DOMContentLoaded', function () {
  document.querySelectorAll('.um-cover, .um-cover-e, .um-profile-photo').forEach(function(el){
    var r = el.getAttribute('data-ratio');
    if (!r) return;
    // Transforme "2.7:1" en "27:10"
    var m = r.match(/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?)$/);
    if (m) {
      var a = parseFloat(m[1]), b = parseFloat(m[2]);
      if (a>0 && b>0) {
        var mul = Math.pow(10, Math.max((m[1].split('.')[1]||'').length,(m[2].split('.')[1]||'').length));
        el.setAttribute('data-ratio', (Math.round(a*mul))+':' + (Math.round(b*mul)));
      }
    }
    if (!/^\d+:\d+$/.test(el.getAttribute('data-ratio'))) {
      el.setAttribute('data-ratio', '1:1');
    }
  });
});
</script>
/* File not found */