Advertisement
Guest User

Untitled

a guest
Feb 28th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. // ==UserScript==
  2. // @name gfy.com
  3. // @description block threads, posts, etc from certain users
  4. // @include http://gfy.com/*
  5. // @include http://*.gfy.com/*
  6. // @require https://code.jquery.com/jquery-1.7.2.min.js
  7. // @version 1.0
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. var hide_users = [
  12. 'brassmonkey',
  13. 'blackmonsters'
  14. ];
  15.  
  16. $(document).ready(function () {
  17. $('#threadslist tbody tr').each(function (thread_index, thread_value) {
  18. var thread_block = $(this);
  19. var thread_starter = $('span[style="cursor:pointer"]', this).text();
  20. $(hide_users).each(function (hide_index, hide_user) {
  21. if (thread_starter === hide_user) {
  22. // $('#threadslist tbody:last').append("<tr style='opacity: 0.5'>" + thread_block.html() + "</tr>");
  23. thread_block.remove();
  24. }
  25. });
  26. });
  27.  
  28. $('table[id^="post"]').each(function (post_index, post_value) {
  29. var post_block = $(this);
  30. var post_author = $('a.bigusername', this).text();
  31. $(hide_users).each(function (hide_index, hide_user) {
  32. if (post_author === hide_user) {
  33. post_block.remove();
  34. }
  35. }); //removes entire post of someone on the ignore list.
  36.  
  37. /** $('div[style^="margin:"]').each(function (post_index, post_value) {
  38. var post_block = $(this);
  39. var post_author = $('strong', this).text();
  40. $(hide_users).each(function (hide_index, hide_user) {
  41. if (post_author === hide_user) {
  42. post_block.remove();
  43. }
  44. });
  45. }); //removes any quotes someone may have made of a person on ignore, even if quotes multiple times but they have to have the name in the quote
  46. **/
  47.  
  48. }); //end of nested forloops for checking both posts and quotes.
  49. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement