Note: BROKEN. This code was written to work with the old group layout and has not been updated with the new one. When I (or someone else) gets around to writing a new version I will update this post.
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
-
Open Google Chrome and install the Tampermonkey extension for the Chrome App Store.
-
Click on the icon for the extension after it installs.
-
In the drop-down menu that pops down, click “Create a new script…”
-
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.
-
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