Author Topic: Steve's useful scripts - Embedder + Blocker Update - Settings in profile  (Read 4840 times)

look im in the op im so cool

also will youtube links still be embedded if they're in [url=][/url] format
« Last Edit: November 22, 2013, 11:27:04 PM by Nikolan »

look im in the op im so cool

also will youtube links still be embedded if they're in [url=][/url] format

Yes.

the youtube embedder doesn't embed https links

the youtube embedder doesn't embed https links

Will fix.
EDIT: fixed, copy the newest version from the OP.



make a script which simply replaces chosen user names with "some friend" whilst keeping the post itself intact

Okay. I made a version that allows you to replace the username, avatar, and message text if you wish.


Code: [Select]
// ==UserScript==
// @name       Funner Post Blocker
// @version    1.0
// @require http://code.jquery.com/jquery-2.0.3.min.js
// @description  Block that user...with style.
// @author: Steve5451
// ==/UserScript==

// Let's set some variables. \\
var blockeduser = 'Badspot'; // The exact name of the user you wish to block.
var usernamereplace = 'CumGuzzler'; // What their name with be replaced with in quotes. Leave empty to disable.
var blockedtext = 'I love rooster.'; // What their post will be replaced with. Leave empty to disable.
var avatarurl = 'http://i.imgur.com/jExkqiw.gif'; // What their avatar will be replaced with. Leave empty to disable.

if(document.URL.indexOf("?topic=") !=-1) {
    $('.windowbg').each(function(i) {
        checkuser($(this));
    });
    $('.windowbg2').each(function(i) {
        checkuser($(this));
    });
}

function checkuser(window) {
    window.find('a').each(function(i) {
        if($(this).parent().attr('class') == "quoteheader") {
            var quote_txt = $(this).html();
            var name_end = quote_txt.indexOf(' on ', 0);
            var name = quote_txt.substring(12,name_end)
            if(name == blockeduser) {
                if(blockedtext != '') {
                $(this).parent().next().html(blockedtext);
                }
                if(usernamereplace != '') {
                $(this).parent().html(usernamereplace);
                }
            }
        }
        if($(this).html() == blockeduser) {
            if(avatarurl != '') {
            $(this).parent().parent().find('.avatar').attr('src', avatarurl);
            }
            if(blockedtext != '') {                                       
            $(this).parent().parent().parent().find('.post').html(blockedtext);
            }
            if(usernamereplace != '') {
                $(this).replaceWith(usernamereplace);
            }
         }   
    });
}

Of course you can replace the variables to whatever you want.
Make a variable blank to disable the replacement, like this:
Code: [Select]
var usernamereplace = '';

Feel free to make requests. I very much enjoy making these.
« Last Edit: November 23, 2013, 12:44:27 AM by Steve5452 »

User blocker blocks topics by the user now. Updated OP.

thanx steve
now I can change peoples names to things I like calling them :)

wait i have greasemonkey how do i enter the scripts again?

edit: figured it out
« Last Edit: November 24, 2013, 05:30:11 PM by Waru »

Added SoundCloud support for the Blockland Embedder, pretty much for those who use the EDM Megathread often. I put it in the OP.
One thing though, there's no good way I know of to determine if a SoundCloud links directly to a song or a profile, so the button is added either way. I think SoundCloud will chose the first song on a profile or something, not sure.
« Last Edit: November 25, 2013, 02:36:10 PM by Steve5452 »

The embedder is so awesome, thank




this is awesome

I noticed that earlier, lol. Still gets the job done. :cookieMonster:
I'll work on it I guess.

EDIT: kfixed yo edited OP.



EDIT2: Also, discovered and fixed a bug where a topic would be blocked if the last post was by the blocked user.

Changed the way the YouTube videos are embedded. Updated OP, use the new version if you wish.
« Last Edit: November 30, 2013, 03:58:20 AM by Steve5452 »


is it possible you could make a script to automatically check the "save a copy in my outbox" button when sending PMs?

is it possible you could make a script to automatically check the "save a copy in my outbox" button when sending PMs?

http://forum.blockland.us/index.php?action=profile;sa=pmprefs