Hide Employed

Hides users that are part of a company.

当前为 2019-06-04 提交的版本,查看 最新版本

// ==UserScript==
// @name         Hide Employed
// @namespace    LordBusiness.HE
// @version      1.0
// @description  Hides users that are part of a company.
// @author       LordBusiness [2052465]
// @match        https://www.torn.com/userlist.php*
// @grant        GM_addStyle
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    const userListWrap = document.querySelector('.user-info-list-wrap');

    new MutationObserver(mutationList => {
        for(const mutationRecord of mutationList) {
            for(const addedNode of mutationRecord.addedNodes) {
                if(addedNode.tagName === 'LI' && !addedNode.className) {
                    if(addedNode.querySelector("#icon27, #icon73")) addedNode.style.display = 'none';
                }
            }
        }
    }).observe(userListWrap, { childList: true });
})();