Remove Down-thumb Count for CC98

隐藏CC98每个帖子的获踩数量

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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         Remove Down-thumb Count for CC98
// @version      0.1.1
// @description  隐藏CC98每个帖子的获踩数量
// @author       anonymousII, dont try to guess who i am :)
// @license      AGPL-3.0
// @match        https://www.cc98.org/*
// @grant        none
// @run-at       DOMContentLoaded
// @namespace https://greatest.deepsurf.us/users/1268364
// ==/UserScript==

(function() {
    'use strict';
    setInterval(function() {
        var divs = document.querySelectorAll('div[id^="dislike"]');
        for (var i = 0; i < divs.length; i++) {
            var div = divs[i];
            if (/^dislike\d+$/.test(div.id)) {
                var children = div.childNodes;
                for (var j = 0; j < children.length; j++) {
                    var child = children[j];
                    if (child.tagName === 'SPAN' && child.className === 'commentProp') {
                        child.textContent = '0';
                        break;
                    }
                }
            }
        }
    }, 500);
})();