• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics in ~tildes with the tag "script". Back to normal view / Search all groups
    1. Script to jump to unread comments in a post

      Okay, so I got tired of scrolling through some of the long comment chains looking for that flash of orange that indicates a new post so I slapped together this solution. It's not pretty nor...

      Okay, so I got tired of scrolling through some of the long comment chains looking for that flash of orange that indicates a new post so I slapped together this solution. It's not pretty nor frictionless to use, but it's less annoying for me than scrolling for days just to find the new comments.

      Basic usage is to open the javascript console or scratch pad (e.g., Shift+F4 in Firefox) in your browser, paste in the following line from the code block and run it. It scrolls to the first unread comment and marks it as read; on subsequent runs it will do the same thing for the next unread comment and so on. You will need to enable new comment tracking in your Tildes preferences as well if you haven't done so yet.

      {var comment = document.getElementsByClassName("is-comment-new")[0]; if (comment != null) {comment.scrollIntoView(); comment.className = "comment"}}
      

      I had hoped that I could make it into a bookmarklet but unfortunately CSP nixes that option. If anyone else knows of a better way to do this let me know.

      10 votes