Protecting My People Online: My Script to Block Suspicious Pedophile Messages

knife

New member
hi, i made a script that blocks specific messages that could have been possibly made by pedophiles around the website. This works for both teen and kidschat.

1676331097685.pngThis is how many messages it deleted just after 20 minutes. 700+ messages? Wow.
The script is also open source, as it may be a little bit too strict with messages. Because of this, DM me any keywords you want me to add or remove, and ill update the script to contain or remove those keywords for you.

SCRIPT: https://controlc.com/bc0efa97

ONCE YOU HAVE THE SCRIPT COPIED; GO TO THE WEBSITE -> RIGHT CLICK AND GO TO INSPECT -> CLICK ON CONSOLE -> PASTE THE CODE AND CLICK ON ENTER

Here's how it works for deletion. For this, ill just make an example chunk of code purely for education:
function blocker() { const keywords = ['Bad Word one', 'Bad Word two'] }
^This is self explanatory, it's just the list of keywords that the code needs to look out for.
const listItems = document.querySelectorAll('li');
^ Since messages are li's [list items], it specifically only looks for keywords like these on list items, so that nothing else but the chat and the DMs are affected.
listItems.forEach(item => {
keywords.forEach(keyword => {
if (item.textContent.includes(keyword)) {
item.remove();
counter++;
}
});
});

^ this means that every time an item is checked, it checks if it has a specific keyword. this could be anything, from "hmu" to "LOOKING FOR #### GIRLS TO #####"
once it checks it, it decides if that keyword is in the message, and then it deletes it if it does.
 
Top