FilterOrdinaryTimesCommenters

Filter out comments for selected commenters at Ordinary Times

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey to install this script.

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        FilterOrdinaryTimesCommenters
// @namespace   kenb
// @include     http://*ordinary-gentlemen.com/*
// @description Filter out comments for selected commenters at Ordinary Times
// @version     1
// @grant       none
// ==/UserScript==


/*

  Replaces the comment text for specified commenters on the
  Ordinary Times blog (nee Ordinary Gentlemen) with "Comment Removed"
  
  Change the regular expression in the commenterPattern variable to control
  which commenters should be ignored -- to just do exact matching, separate
  each commenter handle with a pipe (|). 
*/

var commenterPattern = /data-name="(Commenter1|Commenter2)"/i;
var thisComment;


var allComments = document.getElementsByClassName('comment-content');

for (var i=0; i < allComments.length; i++) 
 	 {
		thisComment = allComments[i];         
        if (commenterPattern.test(thisComment.innerHTML) ) {
            thisComment.innerHTML='<p>Comment Removed</p>';

        }
                
 	}