Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==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('<div align="left"><h4>Steve\'s User Image Blocker</h4>Users to block: <input class="blockedUsers" value="' + localStorage.blockedUsers + '" /> <input type="button" class="saveUsers" value="Save" /><br/><div style="font-size: 8pt;">Add multiple users with a comma. Eg. \"Emo Freak,Nal,Steve-senpai\" without quotes.<br/>Leave blank to disable (although you could just disable the script)</div><br/><td colspan="2"><hr width="100%" size="1" class="hrcolor"></td><br/></div>');
- }
- });
- $('.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 <b>')[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('<input type="button" class="imgShow" revealed="false" value="Show garbage" />');
- img.wrap('<div style="height: 0px; width: 0px; overflow: hidden;"></div>');
- }
- $('a[href="https://forum.blockland.us/index.php?action=profile;u=77986"]').text(atob('UHVzc3kgQm95IFRvbnk='));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement