In Reply to: A script that will remove ALL VISIBILITY of a user posted by Enlightened on November 21, 2025 at 00:01:23
The last one only removed the name. This one removes the entire post.
Unfortunately it also removes any subsequent replies, but like, who gives a crap at this point?
The best part is, if someone is butthurt, I will literally never see it.
I hope the same for the rest of you.
Install the Tampermonkey browser extension (for Chrome, Firefox, etc.).
Create a new user script in the Tampermonkey dashboard.
Paste the code above into the new script and save it.
Navigate to the specified page, and the lines should be removed automatically.
// ==UserScript==
// @name Remove "wwood2" Lines from BruinZone
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Aggressively removes the entire block or line of content containing the string "wwood2" from the specified BruinZone page.
// @author Gemini
// @match https://bruinzone.com/gen/index1.shtml
// @grant none
// @run-at document-idle
// ==/UserScript==
(function() {
'use strict';
const targetString = "wwood2";
const body = document.body;
if (!body) {
console.warn("Tampermonkey Script: Document body not found.");
return;
}
/**
* Traverses up the DOM tree from a given node to find the closest
* block-level element (P, DIV, LI, Hx, etc.), stopping at the body.
* This ensures the removal targets the entire "line" or block.
* @param {Node} node The starting node (usually a text node).
* @returns {Node} The block-level ancestor to remove, or the original node if no block ancestor is found before the body.
*/
function findBlockAncestor(node) {
let current = node.parentElement;
// Traverse up until we hit the body or run out of parents
while (current && current !== body) {
const tagName = current.tagName;
// Check for common block-level tags. We target these for removal.
if (['P', 'DIV', 'LI', 'TR', 'TD', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'BLOCKQUOTE'].includes(tagName)) {
return current;
}
current = current.parentElement;
}
// If the text is directly in the body (or an inline element under the body),
// we fall back to removing the text node itself.
return node;
}
/**
* Traverses the DOM and removes the line/block associated with the target string.
*/
function removeWwood2Content() {
// Create a TreeWalker to efficiently traverse all nodes in the body
const walker = document.createTreeWalker(
body,
NodeFilter.SHOW_ALL, // Show all nodes
null,
false
);
const nodesToRemove = [];
let currentNode;
// Iterate through all nodes
while (currentNode = walker.nextNode()) {
if (currentNode.nodeType === Node.TEXT_NODE) {
// If it's a text node, check its content
if (currentNode.nodeValue && currentNode.nodeValue.includes(targetString)) {
// Aggressively find and target the block-level ancestor
const nodeToTarget = findBlockAncestor(currentNode);
nodesToRemove.push(nodeToTarget);
}
}
}
// Remove the collected nodes (using Set to handle duplicate ancestors)
const uniqueNodesToRemove = [...new Set(nodesToRemove)];
uniqueNodesToRemove.forEach(node => {
if (node.parentNode) {
console.log('Tampermonkey Script: Aggressively removing block containing "wwood2":', node);
node.parentNode.removeChild(node);
}
});
}
// Run the function when the document is ready
removeWwood2Content();
})();