79830259

Date: 2025-11-26 01:33:23
Score: 3.5
Natty:
Report link

Yo he encontrado el siguiente código algo mejor si quiere añadir fecha y si el autor es más largo de ancho que el sidebar ensi, hará que no se solape la segunda linea de autor con la fecha (ya que saltará a la segunda línea el autor)

setTimeout(function(){
  var au = document.querySelector("p.authors, h4.author");
  var dt = document.querySelector("p.date, h4.date");
  var sb = document.querySelector("#toc");
  if (!sb) sb = document.querySelector(".toc-wrapper");
  if (sb && (au || dt)) {
    var footer = document.createElement("div");
    $(footer).css({
      position: 'absolute',
      bottom: '20px',
      left: '20px',
      right: '20px',
      width: 'auto'
    });
    sb.appendChild(footer);
    if (au) {
      $(au).appendTo(footer);
      $(au).css({
        position: 'static',
        marginBottom: '5px',
        fontWeight: 'bold',
        lineHeight: '1.2',
        color: 'inherit'
      });
    }
    if (dt) {
      $(dt).appendTo(footer);
      $(dt).css({
        position: 'static',
        fontSize: '0.85em',
        opacity: '0.7',
        marginTop: '0',
        color: 'inherit'
      });
    }
  }
}, 500);
Reasons:
  • Blacklisted phrase (2): código
  • RegEx Blacklisted phrase (2): encontrado
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Iñigo Fernández Aguirre