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.
Update: 20110312
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.
Update: 20110312
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.
Known Issues
* 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.
Update: 20110315
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.
Update: 20110316
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.



14 Comments

I’ll try it. I already run greasemonkey and mars’s excellent FDL Ignore List.
One thing might help – you could put a link to the script!
Ah, if there is an ignore list already, perhaps this is superfluous. The script is not ready for prime time, yet (currently debugging with the reactor thread).
It’s just an ignore list. You’re making additional/new functionality.
The timestamp feature for the MyFDL would be TERRIFIC!
It’s marxmarv, not mars, duh, and here’s a link to the script so you can see what I’m talking about.
http://userscripts.org/scripts/show/64937
I love it. I use the greyout option.
I seem to have the timestamp feature working great. I’m testing it now on the nuclear thread, and it is a lifesaver.
However, I think Daylight Savings Time will break it. Since we roll over this weekend, I’ll wait until next week to release, which gives me several months to think of something.
Free code? That’s pretty generous, 4cdave …
I’m taking the javascript out for a test drive. Shows up for duty on the pages of the main FDL writers but not on MyFDL pages (darn!) which seems a bit odd just glancing at the code. Hmmm …
Thank you, 4cdave, for your coding efforts.
I ditched the java script FDL Ignore List as it displays but does not work in my setup (Ubuntu). I reloaded with your most recent script. The global replacement of the body of all identified troll commenters becomes “…filtered…”. However, my evil twin has already hacked your beautiful code as it desires a slightly more emphatic, LOLcats style statement.
Meanwhile, a small 4-5 item drop down menu for user definable, personalized versions of the replacement text could be quite satisfying– especially in a user-selectable contrasting color. I could see a use for the comment “dimmer” function but I really, really, really want line numbers back.
“Java Jive (Brasil 1988 + 1970s blended)” – Manhattan Transfer
I am running Firefox v. 3.6.15 on a Mac (OS 10.6.6). Will this work for me? I may wait until you have the bugs out.
I wish you could write a script to un-nest the comments in MyFDL.
Yes, that should work. It has a bit more work to be done, but it should work now, and if you have problems you can just turn it off and everything goes back to normal.
I’ll think about the un-nesting thing. It might be possible.
By “line numbers” do you mean “comment numbers”? As in, “I’m replying to comment #62″? Because that would be very easy to do. However, only you would see the numbers, and when you mention them in your reply, other people would not know what you were talking about.
Yes, you are correct to call them “comment numbers.” I would remember as I keep track of stuff like that. But, maybe that needs to be a contrasting color to remind the user that this display data is only available to them.
Feedback on your current script (this is an observation not a complaint): Responses to trolls also get the “…filtered…” in the body of the comment so one does’t see a potential smack down. *Aw* &-l
:-)
Feature, not a bug. I could easily make it toggle-able.
It’s kinda all Field of Dreams-ish: If you do it, I will beta test it. :-)