A lightweight userscript that filters unwanted news articles based on customizable keywords. Built for Tampermonkey/Greasemonkey browser extensions.
- Overview
- Features
- Project Structure
- Installation
- Configuration
- How It Works
- Troubleshooting
- Privacy & Security
- Contributing
- License
- Credits
ZeroNoise automatically hides news articles containing specific keywords from supported news websites. It works on both static and dynamically loaded content (infinite scroll, AJAX updates), ensuring a cleaner, quieter browsing experience.
- Single-file simplicity: All configuration and logic in one JavaScript file
- Easy customization: Keywords and site templates defined at the top for quick editing
- Dynamic content support: Monitors page changes and filters new articles automatically
- Multi-site support: Pre-configured for 8 major Spanish news sites
- Whole-word matching: Intelligent pattern matching avoids false positives
- Case-insensitive: Matches keywords regardless of capitalization
- Zero dependencies: Pure vanilla JavaScript, no external libraries
zeronoise/
│
├── readme.md # Documentation (this file)
│
└── zeronoise.js # Main userscript
├── Configuration # Keywords list (edit here)
├── Site Templates # CSS selectors for each news site (advanced users only)
└── Core Logic # Filtering and detection algorithms
ZeroNoise consolidates everything into one file for easier management and portability.
Choose one for your browser:
- Tampermonkey (Recommended - Chrome, Firefox, Safari, Edge, Opera)
- Greasemonkey (Firefox only)
- Violentmonkey (Chrome, Firefox, Edge)
- Click on the Tampermonkey icon in your browser toolbar
- Select "Create a new script"
- Delete the default template content
- Copy and paste the entire contents of
zeronoise.js - Save the script (Ctrl+S or Cmd+S)
- Visit a supported news site (e.g., elpais.com, elmundo.es)
- Open browser console (F12 → Console tab)
- Look for ZeroNoise log messages:
[ZeroNoise] Initializing for elpais.com with 37 keywords [ZeroNoise] Filtered 12 articles on initial load [ZeroNoise] Watching for new content
Open zeronoise.js in the Tampermonkey editor and modify the KEYWORDS array:
const KEYWORDS = [
'Trump',
'Mazón',
// Add your keywords here
'new keyword',
'last keyword'
// Remove any keywords you don't want
];Tips for Keywords:
- Multi-word phrases are supported:
'Donald Trump' - Keywords are case-insensitive:
'trump'matches "Trump", "TRUMP", "trump" - Whole-word matching:
'Trump'won't match "trumpet" - Special characters work:
'Mazón'
ZeroNoise uses explicit @match directives in the script header, which means:
- The script only loads on news sites (not on every website you visit)
- Zero overhead when browsing non-news sites
- Faster browser performance overall
- When adding a new site, you must update both the
@matchdirective and theSITE_TEMPLATESsection
ZeroNoise comes pre-configured for these Spanish news sites:
| Site | Domain | Type |
|---|---|---|
| ABC | abc.es | General news |
| El Mundo | elmundo.es | General news |
| El País | elpais.com | General news |
| La Vanguardia | lavanguardia.com | General news |
| La Razón | larazon.es | General news |
| Menéame | meneame.net | News aggregator |
| Marca | marca.com | Sports |
| AS | as.com | Sports |
To add support for a new news website, you need to make two changes:
- Open
zeronoise.jsin Tampermonkey editor - Locate the
@matchdirectives at the top (lines 7-22) - Add two new lines for your site:
// @match *://yournewssite.com/*
// @match *://*.yournewssite.com/*The *:// matches both http and https. The second line with *. catches subdomains like www.yournewssite.com.
- Scroll down to the
SITE_TEMPLATESsection - Add a new entry following this structure:
const SITE_TEMPLATES = {
// ... existing sites ...
'yournewssite.com': {
// Selector for article containers
articleSelector: 'article, div.news-item',
// Selector for headlines within articles
headlineSelector: 'h2, h3, .title',
// Selector for descriptions (optional)
descriptionSelector: 'p.summary, .description'
}
};- Visit the news site
- Open Developer Tools (F12)
- Use the Element Inspector (Ctrl+Shift+C)
- Click on an article, then find:
- Article container: The element wrapping the entire article
- Headline: The link or heading with the article title
- Description: The summary or excerpt text (if present)
Example walkthrough:
<!-- If the site HTML looks like this: -->
<article class="story">
<h2 class="story-title">
<a href="/news/123">Breaking News Title</a>
</h2>
<p class="story-summary">This is the article summary...</p>
</article>
<!-- Your template should be: -->
'example.com': {
articleSelector: 'article.story',
headlineSelector: 'h2.story-title a',
descriptionSelector: 'p.story-summary'
}- Page Load: When you visit a news site, ZeroNoise checks if it's supported
- Initial Scan: Finds all articles using the site template selectors
- Text Analysis: Extracts headline and description text from each article
- Keyword Matching: Checks if text contains any blacklisted keywords
- Article Hiding: Sets
display: noneon matching articles - Continuous Monitoring: Watches for new articles loaded via scroll/AJAX
Article text: "Trump announces new policy on trade"
Normalized: "Trump announces new policy on trade"
Keyword: "Trump"
Regex: (^|\s)Trump(\s|$)
Result: ✓ MATCH (whole word at start)
Article text: "The trumpet player wins award"
Normalized: "The trumpet player wins award"
Keyword: "Trump"
Regex: (^|\s)Trump(\s|$)
Result: ✗ NO MATCH (not a whole word)
- Lightweight: Pure JavaScript, no heavy frameworks
- Efficient: Only processes new content, marks filtered articles
- Non-blocking: Uses MutationObserver for asynchronous updates
- Memory-friendly: Minimal DOM manipulation
-
Check the console (F12) for ZeroNoise messages
- No messages? Script might not be enabled in Tampermonkey
- "No template found"? Site isn't supported yet
-
Verify selectors for the site
- Site may have updated their HTML structure
- Use browser DevTools to find new selectors
-
Test keywords
- Try a very common word to see if filtering works
- Check if keywords match exactly (accounting for punctuation)
Too many articles are hidden
- Review your keywords list for overly broad terms
- Consider removing generic keywords that match unrelated content
- Reduce the number of keywords (fewer = faster)
- The 1-second delay in
init()can be adjusted if needed
The site may have changed their HTML structure. Steps to fix:
- Right-click an article → Inspect Element
- Find the CSS selectors for:
- Article container
- Headline
- Description
- Update the template in
SITE_TEMPLATES
- No external requests: All processing happens locally in your browser
- No data collection: ZeroNoise doesn't track or store any data
- No remote code: No code is loaded from external sources
- Open source: All code is visible and auditable in the userscript
To contribute new site templates:
- Test the selectors thoroughly on the target site
- Verify they work with dynamic content (scroll, load more)
- Use specific selectors to avoid false positives
- Document any site-specific quirks
This project is open source and available for personal use.
- Concept initially inspired by Antiayuseame.
Version: 1.0
Last Updated: January 2026
Compatibility: All modern browsers with Tampermonkey/Greasemonkey support