Play World of Warcraft? Use Wowhead to do your research? Participate in discussions on their forums? Sick of the trolls that live there? Wish there was some way you could make their posts just… disappear? Well, there is.
To start with, it is unfortunate that Wowhead doesn’t have an official way to block/mute other users. If they did, I would simply use that. I’ve read a number of old threads in various forums where the feature has been proposed, but moderators and community managers have nixed the idea mainly because they seem to think that the incidence of trolling is quite low and that they have things under control. As a result, there’s no sign that such a feature is likely to be implemented in the near future.
/disappointed
/sigh
My approach to solving the problem was to use a userscript manager called Tampermonkey. Basically, it’s a web browser add-on that you install, that lets you write Javascript code, and have that code run on certain web pages when you visit them.
So, specifically, my “Mute Trolls” script — which is only about 27 lines long — runs when any Wowhead forum topic page has loaded, scans the page for the usernames of any trolls I have identified, then traverses the document object model and removes any and all posts made by those trolls. It does this within a few milliseconds of the page loading, so I never see their posts — at all.
/cheer
If you can’t see their posts, then you won’t respond to their posts, and you won’t give the trolls the one thing they truly crave — attention. Trolls get attention by writing inflammatory, illogical and provocative things. The mere act of replying to a troll gives them what they want. It doesn’t matter what you write — it’s that you respond. The only way to deal with trolls is to starve them of attention. To ignore them. Having all of their posts automatically hidden from view makes that very, very easy.
Here is the script for your copy-pasting pleasure:
// ==UserScript== // @name Mute Trolls // @namespace http://tampermonkey.net/ // @version 0.1 // @description hide posts by trolls // @author Me // @match https://www.wowhead.com/forums&topic=* // @grant none // ==/UserScript== (function() { 'use strict'; var i,j; var trolls = ["Troll#1"]; var vtp = []; var links = []; while (trolls.length > 0) { var troll = trolls.pop(); var tas = document.querySelectorAll('[href="/user='+troll+'"]'); for (i = 0; i < tas.length; i++) { links.push(tas[i]); } } var vars = document.getElementsByTagName("var"); for(j = 0; j < vars.length; j++) { for (i = 0; i < links.length; i++) { if (vars[j].contains(links[i])) { vtp.push(vars[j]); } } } while (vtp.length > 0) { var trollPost = vtp.pop(); var tbd = trollPost.parentNode.parentNode.parentNode; tbd.parentNode.removeChild(tbd); } })();
I developed the script in Firefox 58 on Ubuntu. It should run on Firefox 57+, Chrome 62+ and Safari 11+ but I haven’t tested — and won’t test — compatibility across browsers (because 1) I don’t use those platforms and 2) this isn’t a ‘product’ that I’m selling to cover the time/cost of performing such testing).
If this script doesn’t work for you on a particular OS/Browser combination please post a comment below to let others know. Maybe someone else out there is running on the same platform, can manage to get it working, and can share their workaround/fix.
Final note: The script just hides posts made by trolls so you don’t see them. It only modifies the pages loaded in your web browser. It doesn’t touch the server in any way. The troll’s posts still exist. Others can still see them. If someone else quotes a troll, you will see the quoted text. The script, again, is only 27 lines long. It was hacked together in an afternoon. It solves my problem. I don’t need anything more complex right now. It may or may not be adequate for your needs. If it isn’t then you can extend it yourself and make it do whatever you want it to do.
PS: To get the above script to work, the process should be as easy as:
- Go to Tampermonkey.net
- Download and install Tampermonkey for your specific browser
- The Tampermonkey icon
should now appear in your toolbar
- Select and copy the above Mute Trolls script
- Click on the Tampermonkey icon and select “Create a new script…” from the menu
- Select and delete all of the default code that appears in your “<New userscript>”
- Paste the code from your clipboard
- Select File > Save from the Editor tab
- Open a new browser tab and go to a Wowhead forum where known trolls live
- Open up a topic in which a known troll has posted
- Make note of some of the troll’s posts
- Switch back to the Tampermonkey tab
- Replace Troll#1 with the exact name of your troll — case matters
- Select File > Save from the Editor tab
- Switch to your Wowhead forum topic tab
- Reload the tab
- All of the troll’s posts should disappear
- If the forums you use are infested with trolls, simply add more troll names (comma separated, within “quotes”) to the list as needed (e.g. [“Troll#1”, “Troll#2”, “Troll#3”])
- If you delete a troll’s name, make sure you delete the corresponding comma as well — the list should not start with a comma, end with a comma, or have two commas in a row
Enjoy!