Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Greasemonkey: Infinite scrolling / comments in tabs

edited January 2009 in Vanilla 1.0 Help
Hi all,

I've written a couple of Greasemonkey extensions for forums that run Vanilla that I thought you might be interested in. If you already know what Greasemonkey is you can skip the next paragraph.

Greasemonkey is a Firefox plugin. It lets you install programs (called "extensions") written in Javascript (either written by you, or by a third party) that are triggered to execute when you visit particular pages. The programs can then modify the page in some way to add new features, re-arrange content, or generally do useful things.

The first extension is vanilla_new_discussions_in_tabs.user.js. This adds a link at the top of the Discussions page. If you click the link all discussions on the current page with unread comments are opened in new tabs. If you tend to read most discussions on a forum this saves a lot of tedious (Ctrl|Middle) clicking.

The second extension is vanilla_infinite_scroll.user.js, which makes discussion and comment pages scroll infinitely. By which I mean -- instead of clicking the links to move to the next discussion page or comment page, the program notices when you scroll to the bottom of the page. At which point it loads the next page in the background, grabs all the comments/discussions from that page, and inserts them at the bottom of the current page. The practical effect is that you could load a discussion that contains 100 unread comments and just keep paging down to see them all, instead of having to click links periodically to move on to the next page.

If you have Greasemonkey installed then installing these is easy -- just click the links above, and Greasemonkey will prompt you to install them. By default, the scripts will only activate themselves on the WOTR forum. To use them on other forums (for example, this one) go to Tools > GreaseMonkey > Manage User Scripts... in Firefox. Find the scripts in the left hand list, and click the Add... button next to the Included Pages list, then enter the URL of the pages you want them to activate on.

For example, to enable them for this forum you would activate them for "http://lussumo.com/community/*". That trailing asterisk is important.

Feedback welcomed, either in this thread, or if you have bugs to report via the bug tracker.

Oh, one more thing -- the infinite scroll extension is a bit chatty -- it logs quite a lot of information to the Firefox Error console (don't worry, these are informational, rather than actual errors). A subsequent release will turn that down, but since the feature is still somewhat new having more debugging information available for error reports is better than less.

Comments

Sign In or Register to comment.