Eliminate Yahoo Finance DOM Noise. Automatically.
$ MutationObserver-powered · Zero-config · Always-on _
A lightweight, surgical script that keeps Yahoo Finance clean and distraction-free.
Powered by MutationObserver, the script watches the entire DOM tree in real-time. Dynamically injected elements are caught and removed the instant they appear — before you ever see them.
No UI. No settings. No bloat. Just drop element IDs into the ELEMENT_IDS_TO_REMOVE array and the script goes live instantly on every Yahoo Finance page visit.
Every git push to main triggers a GitHub Actions workflow that publishes the latest version of the script to GitHub Pages — always live, always current.
Four steps between you and a cleaner Yahoo Finance experience.
You need a userscript manager. Pick yours:
Hit the button below — your userscript manager will automatically detect and load the .user.js file.
⬇ Install ScriptA confirmation screen will appear showing the script's metadata, permissions, and match patterns. Review and click "Install" to proceed.
Navigate to finance.yahoo.com. Targeted DOM elements are silently removed on page load and whenever new elements are injected dynamically.
// ==UserScript==
// @name YF DOM Cleaner
// @namespace https://github.com/replyers/yf-dom-cleaner
// @version 1.0.0
// @description Remove unwanted DOM elements from Yahoo Finance
// @match https://finance.yahoo.com/*
// @grant none
// ==/UserScript==
const ELEMENT_IDS_TO_REMOVE = [
'mrt-node-quoteStream',
'ntk-btf-ad',
'Masthead',
'YDC-MainToolbar',
'Quotestrip',
'ad-slot-header',
'yf-header-promo-banner',
// ↑ Add your target element IDs here
];
Adding new removal targets takes one line. Inspect, copy, paste, done.
Use browser DevTools to identify an element's ID, then add it to the array.
// Step 1: Open DevTools (F12 or right-click → Inspect)
// Step 2: Hover over the element you want to remove
// Step 3: Note its id="..." attribute in the Elements panel
// Step 4: Add the ID to the array below:
const ELEMENT_IDS_TO_REMOVE = [
'existing-element-id',
// ↓ Add your new target here
'your-new-element-id', // <-- paste from DevTools
'another-element-id', // works for any number of IDs
];
// The MutationObserver will automatically watch for
// any of these IDs appearing in the DOM and nuke them.
// Static elements are also removed on DOMContentLoaded.
Right-click any element → Inspect. The Elements panel highlights it. Look for id="...".
After editing the script in Tampermonkey, just Save (Ctrl+S) and refresh Yahoo Finance — changes apply immediately.