View Single Post
Old 02-17-2018, 03:29 PM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,058
I made a tweak or two. I think this version works way better.

You're welcome.

Code:
// ==UserScript==
// @name gfy.com
// @description block threads, posts, etc from certain users
// @include https://gfy.com/*
// @include http://*.gfy.com/*
// @require https://code.jquery.com/jquery-1.7.2.min.js
// @version 1.0
// @grant none
// ==/UserScript==

var show_users = [
'sarettah'
];

$(document).ready(function () {
$('#threadslist tbody tr').each(function (thread_index, thread_value) {
var thread_block = $(this);
var thread_starter = $('span[style="cursor:pointer"]', this).text();
$(show_users).each(function (show_index, show_user) {
if (thread_starter !== show_user) {
// $('#threadslist tbody:last').append("<tr style='opacity: 0.5'>" + thread_block.html() + "</tr>");
thread_block.remove();
}
});
});

$('table[id^="post"]').each(function (post_index, post_value) {
var post_block = $(this);
var post_author = $('a.bigusername', this).text();
$(show_users).each(function (show_index, show_user) {
if (post_author !== show_user) {
post_block.remove();
}
}); //removes entire post of someone on the ignore list.

$('div[style^="margin:"]').each(function (post_index, post_value) {
var post_block = $(this);
var post_block_quote = $('div[style^="font-style:italic"]', this);
var post_author = $('strong', this).text();
$(show_users).each(function (show_index, show_user) {
if (post_author !== show_user) {
//post_block.remove();
$(post_block_quote).html("<br><font color=#998877><i>I'm a useless piece of </i></font><font size=6>&#128169</font>");
}
});
}); //removes any quotes someone may have made of a person on ignore, even if quotes multiple times

}); //end of nested forloops for checking both posts and quotes.
});
__________________
All cookies cleared!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote