Faction reviving filter

Fiter members who need to be revied

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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         Faction reviving filter
// @namespace    http://tampermonkey.net/
// @version      0.8
// @description  Fiter members who need to be revied
// @author       You
// @match        https://www.torn.com/factions.php?step=profile*
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';

    GM_addStyle (`.-profile-mini-_userImageWrapper___2ZKEu{display: none !important;}`);

    var hideFactionBanner = true;
    var hideFactionPage = true;

    if(hideFactionBanner){
        //document.querySelector('.faction-info').style.display = 'none';
        GM_addStyle (`
                    .faction-info{display: none !important;}
    `);
    }

    if(hideFactionPage){
        //document.querySelector('.faction-description').style.display = 'none';
        GM_addStyle (`
                    .faction-description{display: none !important;}
    `);
    }


    hide()

    function hide(){
        //var memberList = document.querySelector('.member-list');
        var memberList = document.querySelector('.table-body');

        if(memberList){
            var factionMembers = memberList.childNodes

            if(factionMembers){

                //var inactives = memberList.querySelectorAll('div.member.icons ul#iconTray li[id^=icon2]');

                for(var member of factionMembers){
                    if(member.nodeType == 1){
                        if((!member.querySelector('.status').innerHTML.toLowerCase().includes('hospital')) || (!member.innerHTML.toLowerCase().includes('online-user'))) {
                        member.style.display = 'none';
                        }
                    }
                }
            }
            else{
                setTimeout(hide, 100);
            }
        }
        else{
            setTimeout(hide, 100);
        }
    }
})();