A free Gold feature
< Commentaires sur Reddit New Comment Highlighting
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');
}
});
};
stopped working on FF