BetterBlox

Filter unwanted roblox games and harmful content

  1. // ==UserScript==
  2. // @name BetterBlox
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0.1
  5. // @description Filter unwanted roblox games and harmful content
  6. // @author Damc (Contributers: @spring67)
  7. // @match *://*.roblox.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
  9. // @grant none
  10. // @run-at document-end
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. const badStrings = [
  17. 'anime', 'skibidi', 'hero', 'mighty omega', 'time of ninja',
  18. 'dress to imp', 'blox fruits', 'brookhaven', 'battleground', 'neko',
  19. 'toilet', 'wukong', 'fat', 'chunky', 'together', 'rp', 'wild horse',
  20. 'mermaid', 'shindo', 'bathroom', 'skibi', 'bathtub', 'baddi', 'furr',
  21. 'pop it', 'asmr', 'running head', 'survive the', 'banban', 'العرب',
  22. 'rng', 'school', 'royal high', 'gymn', 'foblox', 'ultimate tower',
  23. 'dragon', 'shoot and eat', 'dandy', 'salon', 'strideway', 'lgbt',
  24. 'lady athletics', 'love sick', 'scp', 'creatures of son', 'shinobi', 'death row 💀', 'budokai',
  25. 'to save princess', 'catwalk', 'hanami', 'kind legacy', 'naruto', 'jujutsu', '17+', '18+', '🔞', 'all star',
  26. 'aba'
  27. ];
  28. const allowed = ['lucky blocks', 'emergency'];
  29.  
  30. function filterContent() {
  31. const elements = document.querySelectorAll('*');
  32. elements.forEach(element => {
  33. const elementText = element.textContent.toLowerCase();
  34. if (badStrings.some(badString => elementText.includes(badString))) {
  35. if (!allowed.some(allowedString => elementText.includes(allowedString))) {
  36. const parentElement = element.closest('.game-card, .game-item, .game-slider');
  37. const containerMain = document.querySelector("#container-main > div.content");
  38. if (parentElement &&
  39. !parentElement.matches('#place-list, #place-list *') &&
  40. (parentElement.closest('#container-main > div.content') || containerMain.contains(element))) {
  41. console.log(`Bad content removed: "${elementText.trim()}"`);
  42. parentElement.remove();
  43. }
  44. }
  45. }
  46. });
  47.  
  48. const placeListDivs = document.querySelectorAll('#place-list > div');
  49. placeListDivs.forEach(div => {
  50. const divText = div.textContent.toLowerCase();
  51. if (badStrings.some(badString => divText.includes(badString))) {
  52. if (!allowed.some(allowedString => divText.includes(allowedString))) {
  53. console.log(`Bad game removed from place list: "${divText.trim()}"`);
  54. div.remove();
  55. }
  56. }
  57. });
  58. }
  59.  
  60. const observer = new MutationObserver(filterContent);
  61. observer.observe(document.body, {
  62. childList: true,
  63. subtree: true
  64. });
  65.  
  66. filterContent();
  67. })();