Hide Employed

Hides users that are part of a company.

  1. // ==UserScript==
  2. // @name Hide Employed
  3. // @namespace LordBusiness.HE
  4. // @version 1.1
  5. // @description Hides users that are part of a company.
  6. // @author LordBusiness [2052465]
  7. // @match https://www.torn.com/userlist.php*
  8. // @grant GM_addStyle
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. const userListWrap = document.querySelector('.user-info-list-wrap');
  16.  
  17. new MutationObserver(mutationList => {
  18. for(const mutationRecord of mutationList) {
  19. for(const addedNode of mutationRecord.addedNodes) {
  20. if(addedNode.tagName === 'LI' && !addedNode.className) {
  21.  
  22. /* You can hide any icon you want
  23. #icon1 : Online
  24. #icon2 : Offline
  25. #icon3 : Donator
  26. #icon4 : Subscriber
  27. #icon8 : Married
  28. #icon9 : In a Faction
  29. #icon27: Employed in company
  30. #icon62: Idle
  31. #icon71: Traveling
  32. #icon73: Company director
  33. #icon74: Faction Leader or Co-leader
  34. Use commas(,) to hide multiple */
  35.  
  36. if(addedNode.querySelector("#icon27, #icon73")) addedNode.style.display = 'none';
  37.  
  38. }
  39. }
  40. }
  41. }).observe(userListWrap, { childList: true });
  42. })();