One final update on the "Remove WWOOD2" Script


[ Follow Ups ] [ Post Follow Up ] [ UCLA Open Forum ]

Posted by Enlightened on November 21, 2025 at 10:56:59

I realized that while it removed him from the page, it did not prevent me from seeing his replies after I clicked on a post. This new script fixes that.

It sounds like he's thrashing about? Maybe like the T-1000 in the smelting tank at the end of T2?

I hope you all join me. The water's fine.

// ==UserScript==
// @name Remove "wwood2" Lines from BruinZone
// @namespace http://tampermonkey.net/
// @version 1.2
// @description Aggressively removes the entire block or line of content containing the string "wwood2" from all pages under the bruinzone.com/gen/ directory.
// @author Gemini
// @match https://bruinzone.com/gen/*
// @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();

})();


Follow Ups:



Post a Followup

Name:
Email:
Password:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Follow Up ] [ UCLA Open Forum ]