-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremove-roblox-catalog-brainrot.js
46 lines (37 loc) · 1.97 KB
/
remove-roblox-catalog-brainrot.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// ==UserScript==
// @name Roblox Catalog Brainrot Remover
// @namespace http://github.com/idkncc/userscripts
// @version 2024-08-12
// @description Removes brainrot from catalog (freaky, biggest boxes, skibidi, etc)
// @author idkncc (at github/tg)
// @match https://www.roblox.com/catalog*
// @icon https://www.google.com/s2/favicons?sz=64&domain=roblox.com
// @grant none
// ==/UserScript==
(function () {
'use strict';
/*
How to ban words
- just add below in array (write it in lower case and surround in / !), for example: /ban word/, /ban word2/, /gojo/, /rainbow/, etc..
*/
const BAN_WORDS = [/freaky/, /big box/, /biggest box/, /sweater addon/, /skibidi/, /tv man/, /nah, i'm/, /nah, im/, /nah im/, /freak/, /biggest/, /chest crop/, /chest top/, /crop top/, /max design/, /sigma/, /rizz/]
const resultsContainer = document.querySelector(".results-container .item-cards-stackable")
if (!resultsContainer) return;
const config = { attributes: false, childList: true, subtree: true };
const callback = function (mutationList, observer) {
for (const mutation of mutationList) {
for (const addedNode of mutation.addedNodes) {
if (addedNode.nodeType !== 1 && (addedNode.classList?.contains("item-card-caption") ?? false)) continue;
const addedElement = addedNode.firstElementChild?.firstElementChild;
if (!addedElement) continue;
if (!addedElement.classList.contains("item-card-name")) continue;
if (BAN_WORDS.some((regex) => regex.exec(addedElement.innerText.toLowerCase()) !== null)) {
// console.log("removing", addedElement.innerText)
addedElement.parentElement.parentElement.parentElement.parentElement.remove()
}
}
}
};
const observer = new MutationObserver(callback);
observer.observe(resultsContainer, config);
})();