Reddit New Comment Highlighting

A free Gold feature

< 脚本 Reddit New Comment Highlighting 的反馈

评价:一般 - 脚本能用,但还有一些问题

§
发布于:2022-04-29

stopped working on FF

§
发布于:2024-03-24

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');
        }
    });
};

发布留言

登录(不可用)以发布留言。

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