Reddit New Comment Highlighting

A free Gold feature

< Opiniones de Reddit New Comment Highlighting

Puntuación: Pasable; el script funciona, pero tiene carencias importantes

§
Publicado: 29/04/2022

stopped working on FF

§
Publicado: 24/03/2024

It works for me if i change from JQuery to Javascript in the highlight function, like this:

HLN.highlight = function(cutoff) {
    var items = document.getElementsByClassName('entry')
    Array.from(items).forEach(function(element) {
    var time = element.querySelectorAll('time')[0]
        var date = new Date(time.getAttribute('datetime')).getTime();
        if (date > cutoff) {
            element.classList.add('new-comment');
        } else {
            element.classList.remove('new-comment');
        }
    });
};

Publicar respuesta

Inicia sesión para responder.

长期地址
遇到问题?请前往 GitHub 提 Issues。