FDL Plus – A Firefox / Greasemonkey Script
The Firefox browser supports a plugin called Greasemonkey. Greasemonkey, in turn, allows scripts to be written which manipulate the web pages of specific web sites.
I’ve been working on such a script, called FDL Plus, which implements a couple of features that might be of interest to the community. This is a personal project, and not connected in any way to FDL itself. It has substantial functionality now, but everything does not work everywhere, yet. FDL has multiple sub-domains, and they are slightly different.
The script is easy to disable, or to uninstall. Greasemonkey itself is easy to disable or uninstall. With this turned off, everything goes back to normal. Greasemonkey does run 3rd party code in your browser (only scripts that you have explicitly installed), so there are potential security issues. That does not make FDL Plus unsafe, just that you should not install any old Greasemonkey script that you stumble across.
If anyone is interested in being a beta tester, or has feedback on these features or what you might like to see, or if you think this effort is of value, please comment. If nobody is interested, I guess I’ll have to start working on my taxes… It is currently not quite ready for beta testing, but I could polish it up in a couple of days, other tasks permitting.
There do not seem to be any performance issues on my machine. On a long thread (200+ posts) with lots of troll activity, there was a pause of a second or two that I attributed to the script. Mostly, it seems transparent.
Timestamp – MyFDL specific
The first feature is a Timestamp for MyFDL pages. This subdomain nests replies, and in a longer thread makes it hard to track which comments you have not read yet, since it may be in response to a comment at the top of the thread. The other FDL subdomains append all comments to the bottom and indicate which post they are in reply to (except one, which does not support replies). This makes it easy to see which comments you have not read yet, but harder to read a sub-thread in its entirety.
FDL Plus saves a timestamp for that particular post (only for MyFDL posts), and compares it to the date of each comment, and adds a “[new]” string to the metadata bar (right after the date of the comment) for the comments you have not read yet. You can then simply search for “[new]” to read those comments. The next time you fetch the page those “[new]” strings will gone, and only fresh comments will be tagged.
This seems to work fine, but there are a couple of issues. There is a timestamp saved for each unique MyFDL post you read, and those accumulate. I added a function to purge all the timestamps, running that once a month or so would be more than adequate to clean up. Also the [new] tags will probably go away if you post to the thread. I need to do some more testing when we have a lively MyFDL post up.
Blacklist – All Subdomains
This is the Troll-B-Gone feature. You can add user names to a blacklist, which applies only to yourself. This feature will filter out all posts by any user entered in your blacklist. The headers will appear, but the content will simply say “…filtered…”. If you do not see the troll’s posts, you will not be tempted to reply, or reply to reputable user’s replies.
The troll attacks have let up in the last couple of days. While they were active, about 40% of a thread was the initial troll posts and subsequent subthreads. One post had a troll show up and within minutes, 25% of the thread was trollage. This is the objective of trolls – they are not people out for spirited discussion, they are actively trying to suck all the energy out of a site, disrupting its community and thus destroying much of its value. Trying to reason with them is worse than useless. The only solutions are outright banning (which I feel should be done only in more serious cases) and letting them exercise their freedom of speech in an empty room where the rest of us do not hear them. That is the blacklist function.
The second feature is that it also filters the subthreads in the subdomains that support the reply function. I believe this is all of them except one, I think, and now I’ve forgotten which. I do not currently have this working in MyFDL, but I’ll figure it out eventually.
This feature also adds two lines (and a blank line) to the top of the comment thread, reporting “Alpha filtered: ” and “Beta filtered: “. Alpha refers to the count of comments made by the various users in your blacklist. Beta refers to the count of comments in subthreads rooted by those blacklisted comments. Adding the two together gives the total number filtered, and you can compare that to the total number of comments.
There are three functions that support this feature: add a name to the blacklist, remove a name from the blacklist, and display the blacklist.
I have the [new] timestamp working nicely. It isn’t perfect, but still very useful. I’ve put in a property, and a function to set it, for whether California (not your local timezone) is using Daylight Savings Time. It will default to Yes, that way most people will have this working for a few months before having to set it.
The alpha filtering of myFDL pages is working, but not the beta filtering. I think I can release without that.
The “Alpha filtered:” and “Beta filtered:” now only show up if there was actually something filtered, otherwise it looks perfectly normal.
I’m going to test this for a while without making further changes. I’ll probably release in a few days.
OK, so I have no patience. It seems to be working OK for me, so have at it.
Update: 20110313 Installing Greasemonkey
Greasemonkey is an add-on for FireFox, available from mozilla.org. Click the link, then the big green button. You will see a little monkey face in the lower right of your browser. Mouse over him, and you should see a tooltip that says “Greasemonkey is enabled”.
After that, install FDLPlus from the link above.
In your FireFox menu bar you should see Tools. When on an FDL page (otherwise FDLPlus will not be active) go to Tools->Greasemonkey->User Script Commands and you will see the six commands for FDLPlus.
* fdlbooksalon.com is yet another domain, and the script is not enabled there. I’ll upload a fix for that soon.
* The blacklist does not do beta filtering on myFDL. The blacklisted users comments will be gone, but the subthreads are still there. Tricky code, I’ll fix it when I can.
* It appears, now that we have shifted to Daylight Savings Time (DST), that MyFDL continues to report time in Pacific Standard. I’ll wait a day to make sure it stays that way. In the meantime, set DST for California to Off.
I’ve uploaded version 1.1 (same download link). This adds fdlbooksalon.com as a target domain, and changes the default to Pacific Standard Time.
I simply installed the new version over the old one, and the new version number appeared, but the stored variables seem to have gotten confused, and the Greasemonkey “manage user scripts” showed both versions active. I uninstalled both and re-installed, and that seems to work nicely, however your timestamps and blacklist are lost. The lesson seems to be: don’t release very often.
People seem to want the MyFDL comments unnested. I’m pretty sure I can do that when I get time. Maybe that’s an easier way to do this.