Remove Down-thumb Count for CC98

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

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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);
})();