Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Recuit2
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @match https://www.torn.com/page.php?*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- jQuery.expr[':'].regex = function(elem, index, match) {
- var matchParams = match[3].split(','),
- validLabels = /^(data|css):/,
- attr = {
- method: matchParams[0].match(validLabels) ?
- matchParams[0].split(':')[0] : 'attr',
- property: matchParams.shift().replace(validLabels,'')
- },
- regexFlags = 'ig',
- regex = new RegExp(matchParams.join('').replace(/^\s+|\s+$/g,''), regexFlags);
- return regex.test(jQuery(elem)[attr.method](attr.property));
- }
- var listObserver = new MutationObserver(function(mutations) {
- mutations.forEach(function(mutation) {
- //hides faction status
- /*
- $("li:regex(id,icon9__[.]*)").parent().parent().parent().parent().parent().hide() //hides already in a faction (shows leader and co)
- $("li:regex(id,icon74__[.]*)").parent().parent().parent().parent().parent().hide() //hides leader or coleader
- */
- //hides company status
- $("li:regex(id,icon27__[.]*)").parent().parent().parent().parent().parent().hide() //hides company employee
- $("li:regex(id,icon73__[.]*)").parent().parent().parent().parent().parent().hide() //hides company director
- //$("li #icon23").parent().parent().parent().parent().parent().show() //show medical
- });
- });
- listObserver.observe($('.user-info-list-wrap')[0], { attributes: true, childList: true, characterData: true });
- })();
Add Comment
Please, Sign In to add comment