1. BrickPlanet Forum
  2. Game & Scripting Discussion
  3. I created a fix for forums stuck under review.
I created a fix for forums stuck under review.
FloridianRobloxian
Level 2
Joined Aug 15th 2025
Posts 25
Posted Oct 21st 2025 at 5:31AM
function replaceTextInDocument(searchText, replacementText) {
const treeWalker = document.createTreeWalker(
document.body,
NodeFilter.SHOW_TEXT,
null,
false
);

const textNodes = [];
let currentNode = treeWalker.nextNode();

while (currentNode) {
textNodes.push(currentNode);
currentNode = treeWalker.nextNode();
}

textNodes.forEach(node => {
if (node.nodeValue.includes(searchText)) {
node.nodeValue = node.nodeValue.replace(new RegExp(escapeRegExp(searchText), 'g'), replacementText);
}
});
}

function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}

function performReplacements() {
const urlMeta = document.querySelector('meta[property="og:url"]');
const descriptionMeta = document.querySelector('meta[property="og:description"]');

if (urlMeta) {
const urlContent = urlMeta.getAttribute('content');
const urlParts = urlContent.split('/');
const threadTitle = urlParts[urlParts.length - 1];
const formattedTitle = threadTitle
.replace(/-/g, ' ')
.replace(/\b\w/g, char => char.toUpperCase());

replaceTextInDocument('(Under Review)', formattedTitle);
}

if (descriptionMeta) {
const descriptionContent = descriptionMeta.getAttribute('content');
replaceTextInDocument('This post is under review', descriptionContent);
}
}

if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', performReplacements);
} else {
performReplacements();
}
bps2
UGC
Level 12
Joined Feb 1st 2025
Posts 1,834
Posted Oct 22nd 2025 at 3:45PM
thats arleady fixed

Search Forum

Thread Info

Replies
1
Views
11
Created Oct 21st 2025
Last Reply Oct 22nd 2025