I made a script that hides NSFW posts. Here is how to install it.

jackmaxxd

jackmaxxd

Silver
Joined
Oct 15, 2025
Posts
519
Reputation
550
As the title states I made a simple script that lets you hide threads that are tagged as NSFW from being displayed. This is a script made in JS that can be installed following these steps. This should help keep people that are doing the NNN challenge from failing.

1. Install the extension called Tampermonkey (or an extension like it) for either your Firefox based browser or Chrome based browser

Chrome: https://chromewebstore.google.com/detail/dhdgffkkebhmkfjojejmpbldmpobfkfo?utm_source=item-share-cb

2. Click on the Tampermonkey icon and then create new script.

1


3. This opens the editor screen. Remove all the text in there by default and paste in the code of the NSFW blocker.

Link to script: (edit, i had to paste the code directly because pastebin links aren't allowed)

// ==UserScript==
// @name Hide NSFW Threads - Looksmax.org
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Toggle to hide/show NSFW threads on looksmax.org
// @author You
// @match https://looksmax.org/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Configuration
const STORAGE_KEY = 'nsfwToggleState';
const DEFAULT_HIDDEN = true; // Hide NSFW threads by default

// Get saved state or use default
function getToggleState() {
const saved = localStorage.getItem(STORAGE_KEY);
return saved !== null ? saved === 'true' : DEFAULT_HIDDEN;
}

// Save toggle state
function saveToggleState(hidden) {
localStorage.setItem(STORAGE_KEY, hidden.toString());
}

// Find all NSFW threads
function findNSFWThreads() {
const threads = document.querySelectorAll('.structItem--thread');
const nsfwThreads = [];

threads.forEach(thread => {
const nsfwLabel = thread.querySelector('.label--custom-nsfw');
if (nsfwLabel) {
nsfwThreads.push(thread);
}
});

return nsfwThreads;
}

// Hide or show NSFW threads
function toggleNSFWThreads(hidden) {
const nsfwThreads = findNSFWThreads();

nsfwThreads.forEach(thread => {
if (hidden) {
thread.style.display = 'none';
} else {
thread.style.display = '';
}
});
}

// Create toggle button
function createToggleButton() {
const button = document.createElement('button');
button.id = 'nsfw-toggle-btn';
button.textContent = getToggleState() ? 'Show NSFW' : 'Hide NSFW';

// Style the button
button.style.cssText = `
position: fixed;
top: 10px;
right: 10px;
z-index: 10000;
padding: 8px 16px;
background-color: #1a1a1a;
color: #ffffff;
border: 1px solid #444;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
transition: background-color 0.2s, border-color 0.2s;
`;

// Hover effect
button.addEventListener('mouseenter', () => {
button.style.backgroundColor = '#2a2a2a';
button.style.borderColor = '#666';
});

button.addEventListener('mouseleave', () => {
button.style.backgroundColor = '#1a1a1a';
button.style.borderColor = '#444';
});

// Click handler
button.addEventListener('click', () => {
const currentState = getToggleState();
const newState = !currentState;

saveToggleState(newState);
toggleNSFWThreads(newState);
button.textContent = newState ? 'Show NSFW' : 'Hide NSFW';
});

return button;
}

// Initialize the script
function init() {
// Wait for page to be ready
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
return;
}

// Create and add toggle button
const button = createToggleButton();
document.body.appendChild(button);

// Apply initial state
const initialState = getToggleState();
toggleNSFWThreads(initialState);

// Watch for dynamically added threads
const observer = new MutationObserver((mutations) => {
let shouldCheck = false;

mutations.forEach((mutation) => {
if (mutation.addedNodes.length > 0) {
mutation.addedNodes.forEach((node) => {
if (node.nodeType === 1) { // Element node
// Check if a thread was added or if a thread container was modified
if (node.classList && node.classList.contains('structItem--thread')) {
shouldCheck = true;
} else if (node.querySelector && node.querySelector('.structItem--thread')) {
shouldCheck = true;
}
}
});
}
});

if (shouldCheck) {
// Reapply toggle state to any new threads
const currentState = getToggleState();
toggleNSFWThreads(currentState);
}
});

// Start observing
observer.observe(document.body, {
childList: true,
subtree: true
});
}

// Run initialization
init();

// Handle navigation (for SPAs that don't fully reload)
let lastUrl = location.href;
new MutationObserver(() => {
const url = location.href;
if (url !== lastUrl) {
lastUrl = url;
// Reapply toggle state after navigation
setTimeout(() => {
const currentState = getToggleState();
toggleNSFWThreads(currentState);
}, 500);
}
}).observe(document, { subtree: true, childList: true });
})();

4. Then click ‘File’ and ‘Save’

5. Restart the looksmax.org webpage and you should see a button in the top right that lets you toggle on or off NSFW posts.
 
  • +1
  • Ugh..
Reactions: shalomnigga, Miami, Aox Ofwar and 2 others
As the title states I made a simple script that lets you hide threads that are tagged as NSFW from being displayed. This is a script made in JS that can be installed following these steps. This should help keep people that are doing the NNN challenge from failing.

1. Install the extension called Tampermonkey (or an extension like it) for either your Firefox based browser or Chrome based browser

Chrome: https://chromewebstore.google.com/detail/dhdgffkkebhmkfjojejmpbldmpobfkfo?utm_source=item-share-cb

2. Click on the Tampermonkey icon and then create new script.

View attachment 4282799

3. This opens the editor screen. Remove all the text in there by default and paste in the code of the NSFW blocker.

Link to script: (edit, i had to paste the code directly because pastebin links aren't allowed)



4. Then click ‘File’ and ‘Save’

5. Restart the looksmax.org webpage and you should see a button in the top right that lets you toggle on or off NSFW posts.
dnr
 
@Jason Voorhees
 
Pussy script for people without self control and discipline
 
This is a literal malware
 
  • +1
Reactions: oily703 and ognencho
Doesnt work
 
  • JFL
Reactions: silently_said
Below is an analysis focused on whether the code appears AI-generated, with indicators and reasoning.
(You’re welcome to provide more samples or context if you want deeper certainty.)




🔍 AI-Generation Likelihood: Moderate to High


This Tampermonkey userscript shows several stylistic patterns that commonly appear in code produced by ChatGPT or other LLMs. While none of these prove AI generation, together they raise the probability noticeably.




📌 Why it might be AI-generated


### 1. Overly clean, tutorial-like structure


AI-generated userscripts often follow this structure:


  • Clear separation of configuration, utilities, initialization
  • Well-named functions (findNSFWThreads, toggleNSFWThreads, createToggleButton, init)
  • Inline comments describing every step
  • Predictable IIFE wrapper (function(){ ... })() with 'use strict'

Humans often skip some of these niceties—AI rarely does.




### 2. Verbose yet generic explanatory comments


The comments read like something written for teaching or demonstrating best practices:



// Hide or show NSFW threads
// Create toggle button
// Wait for page to be ready
// Handle navigation (for SPAs that don't fully reload)


This is textbook LLM behavior: not wrong, but more descriptive than typical hand-written utility scripts.




### 3. MutationObserver logic is overly general


This section:



if (node.classList && node.classList.contains('structItem--thread')) {
shouldCheck = true;
} else if (node.querySelector && node.querySelector('.structItem--thread')) {
shouldCheck = true;
}


AI models often code with very safe, catch-all conditions—sometimes unnecessarily broad. A human might instead:


  • Check only the specific container XenForo uses.
  • Use targeted selectors like .structItemContainer.

The code is “AI-defensive”—pessimistic, generalized, and verbose.




### 4. The button styling block is unusually neat


This:



button.style.cssText = `
position: fixed;
top: 10px;
right: 10px;
...
`;


The formatting, indentation, and property ordering are typical of AI formatting. Humans often mix formatting, order, or shorthand and rarely maintain such consistent alignment.




### 5. The script solves the task in a very ‘ChatGPT-ish’ way


The workflow is archetypical of an AI response:


  1. Add button
  2. Load state from localStorage
  3. Toggle CSS display
  4. Reapply on DOM change
  5. Handle SPA-like navigation

This is suspicious because:


  • AI models often “over-engineer” solutions by covering many edge-cases (like SPA detection) even when the site doesn’t strictly need it.



📊 Estimated Probability


Based on the patterns above:


≈ 70–80% likelihood of AI involvement


This estimate is not a certainty, just a judgment based on style and structure. A human could absolutely write this—especially a neat, careful coder.




⚖️ What Would Strengthen the Verdict​


If you can provide:


  • The context in which this code was produced (e.g., was it written quickly? Naturally or copy-pasted?)
  • Other code samples from the same author
  • Earlier revisions or drafts

…I can give a more confident probability.




If you'd like, I can also:


  • Point out what parts look least AI-generated
  • Suggest a "more human" rewrite
  • Attempt to guess which model produced it
  • Detect code similarity against known LLM patterns

Just let me know!
 

Similar threads

chromednash
Replies
99
Views
14K
DrMd
D
D
Replies
34
Views
870
flambria
F
D
Replies
29
Views
19K
clover
clover
D
Replies
3
Views
636
Zer0/∞
Zer0/∞
D
Replies
122
Views
48K
seven?
seven?

Users who are viewing this thread

Back
Top