Advertisement
Guest User

security show/hide

a guest
Oct 27th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.87 KB | None | 0 0
  1. // ==UserScript==
  2. // @name        Security.nl
  3. // @namespace   security.nl
  4. // @description Show/Hide user
  5. // @include     *.security.nl/*
  6. // @version     1
  7. // @grant       none
  8. // @require     https://code.jquery.com/jquery-3.3.1.min.js
  9. // ==/UserScript==
  10.  
  11.  
  12. var blockedUsers = ['name1', 'name2'];
  13.  
  14. var dontRead = $('div.posting_header div.left a[href="/profile?alias=' + blockedUsers.join('"],a[href="/profile?alias=') + '"]');
  15. dontRead.parent().parent().css('background-color', 'red');
  16. dontRead.parent().parent().parent().children('div.posting_body_container').css('display', 'none');
  17.  
  18. dontRead.parent().parent().children().on('click', function() {
  19.   var messageBody = $(this).parent().parent().children('div.posting_body_container');
  20.     if (messageBody.css('display')=='none') {
  21.         messageBody.css('display', '')
  22.     } else {
  23.         messageBody.css('display', 'none')
  24.     }
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement