Hide Certain TYT Member's comments

Simple script to hide any annoying TYT member's posts and comments.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name     Hide Certain TYT Member's comments
// @description:en  Simple script to hide any annoying TYT member's posts and comments.
// @include  https://tytnetwork.com*
// @require  https://code.jquery.com/jquery-2.1.3.min.js
// @version 0.0.1.20170131051239
// @namespace https://greasyfork.org/users/98831
// @description Simple script to hide any annoying TYT member's posts and comments.
// ==/UserScript==

function addJQuery(callback) {
    var script = document.createElement("script");
    script.setAttribute("src", "https://code.jquery.com/jquery-2.1.3.min.js");
    script.addEventListener('load', function() {
        var script = document.createElement("script");
        script.textContent = "(" + callback.toString() + ")();";
        document.body.appendChild(script);
    }, false);
    document.body.appendChild(script);
}

// load jQuery and execute the main function
addJQuery(main);

// The example below hides comments by member: dDErss.
// And let's face it why wouldn't you want to hide his self righteous drivel?
// If you want to hide comments from even some other pompous member, just copy and paste all the lines that contain 'dDErss'
// And then simply change the name from dDErss to the member you would also like to stop seeing comments from...
//
// Or to reverse the process, delete the lines containing a members name to allow for their comments to be seen again.
// Pretty simple stuff.

function main() {
    $('.x-comment-content-wrap:contains("dDErss")').hide();
    
//  Enabling the two lines below will create a much cleaner layout, 
//  But will ALSO remove any responses to, or any other post with a comment from, the hidden TYT member...
//  So other posts willl be affected, not just those of the hidden TYT member

//  $('.children:contains("dDErss")').hide();
//  $('.comment:contains("dDErss")').hide();

}

// It's not perfect, as I quickly typed it up while watching my toast brown one breakfast morning...
// But it gets the job done.
// And there's probably a more efficient way to write the script... and one day I'll look at it a bit more closely.
// But not today. LOL!