[Website usability] Scroll to new comments (v0.3)

I wrote a short userscript1 that allows for jumping to the next (or previous) new comment in a page (those marked with green). I have tested it on Firefox nightly with the Greasemonkey addon and Chromium. Unfortunately, I think that user scripts only work in Chromium/​Google Chrome and Firefox (with Greasemonkey).

Download here (Clicking the link should offer a install prompt, and that is all the work that needs to be done.)

It inserts a small box in the lower right-hand corner that indicates the number of new messages and has a “next” and a “previous” link like so:

Clicking either link should scroll the browser to the top of the appropriate comment (wrapping around at the top and bottom).

The ”!” link shows a window for error logging. If a bug occurs, clicking the “Generate log” button inside this window will create a box with some information about the running of the script2, copying and pasting that information here will make debugging easier.

I have only tested on the two browsers listed above, and only on Linux, so feedback about any bugs/​improvements would be useful.

(Technical note: It is released under the MIT License, and this link is to exactly the same file as above but renamed so that the source can be viewed more easily. The file extension needs to be changed to “user.js” to be able to run as a user script properly)

Changelog

v0.1 - First version

v0.2 - Logging & indication of number of new messages

v0.3 - Correctly update when hidden comments are loaded (and license change). NOTE: Upgrading to v0.3 on Chrome is likely to cause a “Downgrading extension error” (I’d made a mistake with the version numbers previously), the fix is to uninstall and then reinstall the new version. (uninstall via Tools > Extensions)


1 A segment of javascript that runs in the web browser as the page is loaded. It can modify the page, e.g. inserting a bit of html as this script does.

2 Specifically: the url, counts of different sets of comments, some info about the new comments, and also a list of the clicks on “prev” and “next”.