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

发表回复

登录(不可用)以发表回复。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址