new code to block sig+avatar:
Code
function parsePage(){
console.log('sup');
var blockedUser = GM_getValue('fokse_post_blocker_userlist')
$('body > form > dl').each(function() {
if (typeof $('.pU > div > a', this).attr('href') !== 'undefined' && ~$('.pU > div > a', this).attr('href').indexOf('user.php?i=')) {
var userId = $('.pU > div > a', this).attr('href').split("=")[1];
if (~blockedUser.indexOf(userId)){
$('dd > div > div.bc1.upc > div.desc.cl.rc > div.fR.links', this).prepend(`<b><a href="#" class="blockPost" action="unblock" userId="${userId}">Unblock Posts</a></b>`);
$('dd > div > div.bc1.upc > .sig', this).hide();
$('.pU', this).children().eq(1).hide()
$('div.bts', this).html('<center><b><span style="color:#d65a5a;">Post from that user are hidden</style></b></center>');
} else{
$('dd > div > div.bc1.upc > div.desc.cl.rc > div.fR.links', this).prepend(`<b><a href="#" class="blockPost" action="block" userId="${userId}">Block Posts</a></b>`);
}
}
});
$('.blockPost').click(function(){
var blockedUser = GM_getValue('fokse_post_blocker_userlist'),
userId = $(this).attr('userId');
if ($(this).attr('action') == "block" && !~blockedUser.indexOf(userId)){
blockedUser.push(userId);
}
else if ($(this).attr('action') == "unblock" && ~blockedUser.indexOf(userId)){
blockedUser.splice(blockedUser.indexOf(userId),1);
}
GM_setValue("fokse_post_blocker_userlist", blockedUser);
location.reload();
})
}
