v1.0.0 · Tampermonkey / Greasemonkey
YF

YF DOM Cleaner

Eliminate Yahoo Finance DOM Noise. Automatically.

$ MutationObserver-powered · Zero-config · Always-on _

0ms
Reaction Time
100%
Auto Removal
Custom Targets
MIT
License
scroll
Features

Why YF DOM Cleaner?

A lightweight, surgical script that keeps Yahoo Finance clean and distraction-free.

🛡️

DOM Sentinel

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.

MutationObserver API

Zero-Config

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.

Array-based config
🔄

Auto-Deploy

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.

GitHub Actions CI/CD
Installation

Get Started in 60 Seconds

Four steps between you and a cleaner Yahoo Finance experience.

1

Install the Browser Extension

You need a userscript manager. Pick yours:

2

Click "Install Script"

Hit the button below — your userscript manager will automatically detect and load the .user.js file.

⬇ Install Script
3

Confirm the Installation Dialog

A confirmation screen will appear showing the script's metadata, permissions, and match patterns. Review and click "Install" to proceed.

4

Visit Yahoo Finance — Done!

Navigate to finance.yahoo.com. Targeted DOM elements are silently removed on page load and whenever new elements are injected dynamically.

yahoo-finance-dom-cleaner.user.js
// ==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
];
Customization

Make It Yours

Adding new removal targets takes one line. Inspect, copy, paste, done.

🔍 Find & Remove Any Element

Use browser DevTools to identify an element's ID, then add it to the array.

customization-example.js
// 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.
💡

DevTools Shortcut

Right-click any element → Inspect. The Elements panel highlights it. Look for id="...".

Instant Reload

After editing the script in Tampermonkey, just Save (Ctrl+S) and refresh Yahoo Finance — changes apply immediately.