The Jury Talks Back

9/24/2017

How to Make the Comments of Annoying Commenters Disappear from Your Screen

Filed under: Uncategorized — Patterico @ 12:53 pm

I don’t like to ban people. I generally ban people only when they commit an egregious offense. I often get requests to ban people whom folks find annoying. But being annoying isn’t a bannable offense.

But you shouldn’t have to suffer the annoyance of seeing a comments section overrun by people who do nothing but aggravate you. Am I right?

Today, there’s a better way!

Beldar explained how to do it in this comment. An edited version of Beldar’s explanation appears below, correcting one minor error in his explanation.

Follow these instructions and the annoying commenters will disappear from your screen. Just hit the bookmark after accessing the page. It has the effect of refreshing the page while eliminating the annoying commenter.

All credit for this ought to go to felipe and milhouse.

(1) I can’t reprint the script here in these comments because it uses characters that confuse the readers’ browsers and that will make the script incomplete. So instead of printing it here in comments for people to cut and paste, here’s instead a link to a tiny simple ASCII text file called “patterico_blocker_script.txt” that anyone can right-click and select “save link as” to download and save the file to his/her own computer. Feel free to rename it if you like.

(2) Once downloaded and saved, open that file with any text editor. Since it has “.txt” as its extension, whatever your computer is set up to use as its default ASCII editor will likely open it when you double-click the file name. I use the old reliable Windows Notepad for this type of dirt-simple text-file editing; other programs might add formatting and stuff you don’t want or need unless you’re careful to specify ASCII.

(3) Look (or text-search) for “name1″ and replace that with the screenname of the first commenter you wish to block. Extras don’t matter; you can leave “name4″ in the script, for example, if you only want to block three commenters. But likewise, if you wish to block more than four, just start adding those names in that same part of the script, using the up-and-down symbol | as the separator.
(I’m not sure if this is case-sensitive and haven’t tested that; I just copied the commenters’ names from here and pasted them verbatim to replace “name1,” etc., one at a time.)

(4) When you’re done editing, re-save the text file on your own computer. Again highlight the whole text string as edited (CTRL+A), copy it to your clipboard (CTRL+C), and then go back to your browser window.

(5) Now you’re then going to create a new bookmark. The difference from bookmarks you usually create and use is that this isn’t a bookmark that tells your browser to go to some particular URL. Instead, it stays at the URL you’re already at, and simply runs the commands in the script on whatever webpage you currently have open.

Every popular browser has multiple different ways to create and edit bookmarks. It might be easier just to bookmark some random webpage the way you’re usually used to doing, and then to simply edit that one, than to try to create one from scratch.

But to create one from scratch, for me, using the Chrome browser, the easiest way was simply to open an empty browser tab, and type CTRL+D to open the small text box for new bookmarks. There will be a suggested title of “New tab”; ignore that. Instead, left-click on the “Edit” button so that a slightly bigger window will pop up with more options. I decided to name my new bookmark “Patterico+script” and I decided to save it in my “Bookmarks bar” (which I have enabled regularly), but not inside one of my folders (because I don’t want to have to open a bookmarks folder every time I use this new bookmark — which is quite a bit, after every page reload.) Below the “Name” text field is one for “URL.” Delete whatever Google’s suggested, and instead paste (CTRL+V) your edited text script into that tiny field-box, like this. Don’t worry that it spills over and can’t all be read, it won’t matter. Click the Save box at the bottom.

(6) Now every time you visit a page with comments at Patterico.com, you can tap that bookmark and it will execute the script, which tells your browser to redraw that page leaving out the text — but not the comment numbers or commenters’ names — from all the objectionable commenters you’ve blacklisted, like this.

Here’s what it looked like when I did it. Here’s before:

Before Script

And here’s after:

After Script

Glorious! Instead of having to read a misrepresentation of my post that I explicitly disclaimed in the post, I can just make that person go poof! I get the added satisfaction of seeing that his comments are there. I can just choose not to read them.

For those who would like a video demonstration of how to do this, Beldar has given us that as well, here. I thank him for his efforts, as well as Milhouse and felipe.

No more whining about commenters. Nuke them yourself. It works!

UPDATE: Beldar encourages me to note some subtleties about the script. First, it is not case-sensitive. But the easiest way to make it work is to simply copy the user’s screen name verbatim, as the instructions suggest. This will work even if that screen name contains embedded blanks and/or punctuation.

Do not simply paste the edited script into the browser’s main URL field. It seems as though that should be the same thing as clicking a bookmark with the script saved in the bookmark’s URL field. But that is not right. It has to be in a bookmark.

And please remember: the newly created bookmark must be clicked, causing the script to run, after every page re-load. For example, if you leave a comment on a page, when you hit “Submit Comment” that has the effect of re-loading the whole page. Any previously hidden comments will suddenly re-appear, until you click on the bookmark. I made this my top bookmark, since I will be using it often.

Finally, should you wish to see a comment by a blocked commenter, you can simply left-click the permalink for the comment (the date and time hyperlink to the right of the commenter’s screen name) to toggle back and forth between showing the comment and hiding it.

8 Comments »

  1. UPDATE: Beldar encourages me to note some subtleties about the script. First, it is not case-sensitive. But the easiest way to make it work is to simply copy the user’s screen name verbatim, as the instructions suggest. This will work even if that screen name contains embedded blanks and/or punctuation.

    Do not simply paste the edited script into the browser’s main URL field. It seems as though that should be the same thing as clicking a bookmark with the script saved in the bookmark’s URL field. But that is not right. It has to be in a bookmark.

    And please remember: the newly created bookmark must be clicked, causing the script to run, after every page re-load. For example, if you leave a comment on a page, when you hit “Submit Comment” that has the effect of re-loading the whole page. Any previously hidden comments will suddenly re-appear, until you click on the bookmark. I made this my top bookmark, since I will be using it often.

    Finally, should you wish to see a comment by a blocked commenter, you can simply left-click the permalink for the comment (the date and time hyperlink to the right of the commenter’s screen name) to toggle back and forth between showing the comment and hiding it.

    Comment by Patterico — 9/24/2017 @ 1:06 pm

  2. I had created a similar bookmarklet script last year during the run up to the election to kill all of happyfeet’s posts, it works great, but since moving to this version of your site I haven’t needed it. I’m happy to share it if anyone else wants to give it a try.

    Comment by Sean — 9/25/2017 @ 9:54 am

  3. It is better here. The downside is there aren’t many comments but the upside is they are generally thoughtful.

    Comment by DRJ — 9/25/2017 @ 10:20 am

  4. Smoetimes this subsite has a feel of rolling tumbleweeds.

    Comment by aphrael — 9/25/2017 @ 10:55 am

  5. You mean like a soliloquy? I’ve done that when no one else seems to be around, and my comments roll on and on and on.

    Comment by DRJ — 9/25/2017 @ 11:28 am

  6. Just in case anyone wants it here is my bookmark script:

    javascript:(function(){var%20c=document.getElementsByClassName(‘comment-author’);for(var%20i=0;i=0){c[i].parentElement.style.display=’none';}}})();

    Note, mine was only designed to eliminate one particular poster, but it could be adjusted to allow for a list of posters.

    Comment by Sean — 9/25/2017 @ 7:32 pm

  7. Looks like it strips out the important part of the script. Just replace everything after (‘comment-author’); with the following:

    for(var%20i=0;i=0){c[i].parentElement.style.display=’none';}}})();

    Comment by Sean — 9/25/2017 @ 7:34 pm

  8. Geez, I give up, the comment function is stripping odd things. Sorry that post didn’t work. Patterico, if you want to include mine as well let me know and I’ll send it to you since posting in the comments won’t work.

    Comment by Sean — 9/25/2017 @ 7:35 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

Comment moderation is enabled. Your comment may take some time to appear.

Live Preview


Powered by WordPress.