Shitpost

Hides forum posts that have a positive rating.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

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

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Shitpost
// @version      0.02
// @description  Hides forum posts that have a positive rating.
// @match      https://www.torn.com/forums.php*
// @grant        none
// @namespace https://greasyfork.org/users/1041152
// ==/UserScript==
 
(function() {
    'use strict';
 
    // Define the main code that hides disliked posts
    function hideDislikedPosts() {
        $('li').each(function(index) {
            const selector = `li:nth-of-type(${index + 1}) > .thread-info-wrap > .thread.right > .rating > .like-icon.voted`;
            //console.log(`Checking element with selector ${selector}`);
            if ($(selector).length > 0) {
                //console.log(`Hiding element with selector ${selector}`);
                $(`li:nth-of-type(${index + 1})`).hide();
            }
        });
    }
 
    // Check for new posts every 100 seconds and run the main code if any are found
    setInterval(function() {
        if ($('li.new').length > 0) {
            hideDislikedPosts();
        }
    }, 100);
})();