Automatically remove bot posts on your group wall [v1.0.3]


#1

This is something I posted a while back on the Roblox subreddit and it was received pretty positively so I figured I’d drop it here for anybody else who wants to use it.

Instructions

  1. Open Google Chrome and install the Tampermonkey extension for the Chrome App Store.

  2. Click on the icon for the extension after it installs.

  3. In the drop-down menu that pops down, click “Create a new script…”

  4. A window will open for you to create a new script in. Remove the code that is already in there and paste the code provided below.

  5. Modify the values I tell you to in the comments of the script, save the script, then run it on the page for your group wall (you’ll need the privileges to delete comments on it of course).The bot comments will begin deleting. Feel free to leave it running for as long as you’d like!

    // ==UserScript==
    // @name Group Wall Blacklist
    // @namespace http://roblox-blacklist/
    // @version 1.0.3
    // @description Delete posts on your group wall that have words from the blacklist.
    // @author BADGRAPHIX (All versions but 1.0.1)
    // @author Stelonlevo (1.0.1)
    // @match *://www.roblox.com/My/Groups.aspx*
    // @grant none
    // @require http://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
    // @require https://www.thomasfrank.se/sessvars.js
    // ==/UserScript==
 
    //HERE'S WHAT YOU NEED TO DO:
    //Modify the blacklist below to your liking. Any post on your group wall with any of these words will be automatically deleted.
 
    var AdvancePages = false //Set this to true if you want to check more than just the first page. I have this disabled by default to prevent people from accidentally wiping out their whole group wall history with a bad blacklist.
    var wordBlacklist = new Array('robux')
    //Blacklist notes:
    //Keep the words all lowercase. Don't worry, when the script runs it will check for any casing, but in the blacklist it must be all lowercase.
    //Don't include simple words. This script will check for these words anywhere in the text, so if you add 'run' to the blacklist,
    //it will delete a post that has the word 'cRUNchy' in it, for example.
    //A blacklist with multiple words is formatted like this: new Array('robux','free','scam')
    var theForm = document.forms['aspnetForm']
    if (!theForm) {
        theForm = document.aspnetForm
    }
 
    function __doPostBack(eventTarget, eventArgument) {
        if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
            theForm.__EVENTTARGET.value = eventTarget
            theForm.__EVENTARGUMENT.value = eventArgument
            theForm.submit()
        }
    }
 
    function VetNthPost() {
        var CurrentPage = Number($("#ctl00_cphRoblox_GroupWallPane_GroupWallPager_ctl01_Div1").text().replace("of", "").replace("Page ", "").trim())
 
        if (Number(CurrentPage) < Number(sessvars.Page)) {
            console.log("Page: "+CurrentPage+" Expected: "+sessvars.Page)
            console.log("Past page")
            return false
        } else if (Number(CurrentPage) > Number(sessvars.Page)) {
            console.log("Page: "+CurrentPage+" Expected: "+sessvars.Page)
            sessvars.Page = Number(CurrentPage)
            VetNthPost()
            return false
        } else {
            console.log("Page: "+CurrentPage+" Expected: "+sessvars.Page)
            var WallPost = $('.GroupWall_PostContainer').eq(sessvars.WallPost)
            var isBadPost = false
            if (WallPost.parent().find("[id$=LinkButton0]").length) {
                wordBlacklist.forEach(function(word) {
                    if (WallPost.text().toLowerCase().includes(word))
                    {
                         isBadPost = true
                         return true
                    }
                })
            }
 
           
            if (isBadPost === true) {
                console.log("Deleting post")
                __doPostBack('ctl00$cphRoblox$GroupWallPane$GroupWall$ctrl'+sessvars.WallPost+'$LinkButton0','')
            }
            else {
                if (sessvars.WallPost >= 9) { //Called on last post of page
                    if (AdvancePages === true) {
 
                        console.log("Proceeding to next page")
                        sessvars.Page = sessvars.Page + 1
                        sessvars.WallPost = 0
                        console.log("Page is now: "+sessvars.Page)
                        __doPostBack('ctl00$cphRoblox$GroupWallPane$GroupWallPager$ctl02$ctl00','')
                    } else {
                        sessvars.Page = Infinity
                        return false;
                    }
                } else {
                    console.log("Proceeding to next post.")
                    /*if (sessvars.WallPost > 9)
                {
                    sessvars.Page = 1;
                    sessvars.WallPost = 0;
                    setTimeout(refreshPage, 60000);
                }
                else
                {*/
                    sessvars.WallPost = sessvars.WallPost + 1
                    VetNthPost()
                }
 
            }
        }
    }
 
    function refreshPage() {
       window.location.href=window.location.href;
 
    };
    function vet() {
        console.log("Current: "+window.location.href+" last: "+sessvars.SetURL)
        if (window.location.href != sessvars.SetURL) {
            sessvars.$.clearMem()
            console.log("Changed group")
        }
        if (!sessvars.Page || !Number(sessvars.Page)) {
            console.log("First setup")
            sessvars.SetURL = window.location.href
            sessvars.WallPost = 0
            console.log("Setting page to "+ Number($("#ctl00_cphRoblox_GroupWallPane_GroupWallPager_ctl01_Div1").text().replace("Page ", "").trim()))
            sessvars.Page = Number($("#ctl00_cphRoblox_GroupWallPane_GroupWallPager_ctl01_Div1").text().replace("Page ", "").trim())
        }
        VetNthPost()
    }
 
    $(vet())

I’ve noticed bots are starting to mess with varying messages to get around the blacklist, but you can combat this by just adding new words to the blacklist. Try to add something specific that a normal user wouldn’t ever say, because you don’t want to accidentally remove real wall posts. Remember the “no simple words” rule in the blacklist notes!

Updates
11/20/18: Updated to version 1.0.3! The script now properly supports checking beyond the first page. Just set the “AdvancePages” variable to true in the posted code to enable this functionality.

Legacy Code (do not use this)
v1.0.2


Game Development Resources [MEGA THREAD]
A way to massively delete group wall posts?
#2

This is helpful.

Saved and bookmarked.


#3

Useful in some situations! Thanks.


#4

Haha, I actually saw that on the subreddit and have been using it since. Thank you for this!


#5

Awesome! My Friend @samlambrechts and I would love this!


#6

Thanks :smiley:
It works very good


#7

You may be able to simplify your code by using the new groups endpoints: https://groups.roblox.com/docs. That way you won’t have to do ASP.NET postbacks.


#8

Thanks! I don’t have to spam delete anymore :happy2:


#9

Can’t wait to use this


#10

this happend to me, there is no way I can do it myself, so thanks!


#11

This only works for the first page of the group wall, or am I missing something?


The script is great if you want to remove ALL of the group wall post just put

a,e,i,o,u in the blacklist array


#12

At least in the setting I’m using it in, I never actually get past the first page because it deletes massive chains of bot posts. Meaning it never increments past the first post, as the first post continually gets deleted.


#13

Update: I have rewritten the code to properly support checking the next page. You will need to enable it manually by setting the “AdvancePages” variable to “true”.


#14

Super useful, saved.


#15

Thank you for this. I’ll make sure people know about this too since they have the same problems (As well as me).