Remove Down-thumb Count for CC98

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

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

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