hkepcFilter

You can block some members by editing blacklist.

คุณจะต้องติดตั้งส่วนขยาย เช่น 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!)

Advertisement:

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!)

Advertisement:

// ==UserScript==
// @name     hkepcFilter
// @include https://www.hkepc.com/forum/*
// @require http://code.jquery.com/jquery-3.6.0.min.js
// @description You can block some members by editing blacklist.
// @version 1.0
// @license MIT
// @namespace https://greasyfork.org/users/1056810
// ==/UserScript==

const blackList = [
  "member1",
  "member2",
  "member3",
  "member4",
];

$(document).ready(function () {
  $("tbody").each(function (index) {
    var author = $(this).find(".author").find("cite").text().trim();
    if (blackList.indexOf(author) !== -1) {
      $(this).remove();
    }
  });

  $("tbody").each(function (index) {
    var author = $(this)
      .find(".postauthor")
      .find(".postinfo")
      .find("a")
      .text()
      .trim();

    if (blackList.indexOf(author) !== -1) {
      $(this).remove();
    }
  });

  $(".quote").each(function (index) {
    var author = $(this).find("blockquote").find("font").text().split(" ")[0];

    if (blackList.indexOf(author) !== -1) {
      $(this).remove();
    }
  });
});