// ==UserScript== // @name Steve's User Blocker Reborn // @version 1.0 // @require http://code.jquery.com/jquery-2.0.3.min.js // @include *forum.blockland.us* // @include *blockland.us/smf* // @description Works best with Emo Freak :^) // @author: Steve5451 // ==/UserScript== //Known bugs: If a blocked user quotes another blocked user, then you'll have two unblock buttons. var defUsers = "BETELGEUSE SUCKS COCKS"; //Default user(s) to block, seperated with a comma Eg. "Emo Freak,Nal,Steve-senpai". You can leave this alone and you will be prompted whether you want to change it when you first run the script. //-------- you should probably leave this stuff below alone --------\\ if(localStorage.blockedUsers == null) { var goToProfile = confirm('User Blocker: User table created with default of "' + defUsers + '". Press Ok to change blocked users.'); localStorage.blockedUsers = defUsers; if(goToProfile == true) { window.location = 'http://forum.blockland.us/index.php?action=profile;sa=theme'; } else { alert("User Blocker: You can change the blocked users at any time by going to your Look and Layout Preferences in your profile."); } } if(document.URL.indexOf('sa=theme') != -1) { $('input').each(function() { if($(this).val() == 'Change profile') { $(this).before('

Steve\'s User Image Blocker

Users to block:
Add multiple users with a comma. Eg. \"Emo Freak,Nal,Steve-senpai\" without quotes.
Leave blank to disable (although you could just disable the script)



'); } }); $('.saveUsers').click(function() { localStorage.blockedUsers = $('.blockedUsers').val(); alert("Saved"); }); } else if(document.URL.indexOf('topic=') && localStorage.blockedUsers != '') { var blockedusers = localStorage.blockedUsers; var curName = blockedusers.split(','); curName.forEach(function(thisName) { $('.windowbg, .windowbg2').each(function() { var name = $(this).children().children().first().children().first().children().first().children().first().children().first().html(); if(name == thisName) { blockstuffs($(this).find('.post').find('img')); } }); $('.quoteheader').each(function() { var name = $(this).children().first().html().split('Quote from: ')[1].split(' on ')[0]; if(name == thisName) { blockstuffs($(this).next().find('img')); } }); }); $('.imgShow').click(function() { if($(this).attr('revealed') == 'false') { $(this) .attr('revealed', 'true') .val('Hide garbage') .next().css('height', 'auto') .css('width', 'auto'); } else { $(this) .attr('revealed', 'false') .val('Show garbage') .next().css('height', '0px') .css('width', '0px'); } }); function blockstuffs(img) { img.before(''); img.wrap('
'); } $('a[href="https://forum.blockland.us/index.php?action=profile;u=77986"]').text(atob('UHVzc3kgQm95IFRvbnk=')); }