Reddit highlight newest comments

Highlights new comments in a thread since your last visit

< 脚本 Reddit highlight newest comments 的反馈

提问 / 留言

§
发布于:2017-08-21

Bug: Last visited time is not updated on refresh

Cause appears to be that Reddit comment URLs have changed. They now include the query parameters st and sh. IDK if they always appear in the same order. I was able to fix it by changing the commentReg regex to

commentReg = /^https?:\/\/(www\.)reddit\.com\/r\/[a-zA-Z0-9_-]+\/comments\/[0-9a-z]+\/[0-9a-z_]+\/(\?st|h)?.*$/;

It may also be necessary to update permalinkReg, but I wasn't sure what that part of the script was supposed to do.

发布留言

登录以发布留言。