Skip to content

About

Chrome extension that hides YouTube Shorts from the home feed, subscriptions, search, watch-page sidebar and navigation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NoShorts

A lightweight Chrome extension that hides YouTube Shorts from your browsing experience.

Supported Surfaces (v1)

Surface What gets hidden
Home feed (/) Shorts shelf/section
Subscriptions (/feed/subscriptions) Shorts shelf/section
Search results (/results) Shorts shelf + individual Shorts entries
Watch page (/watch) Shorts in sidebar recommendations
Left sidebar "Shorts" navigation link

Intentionally excluded in v1

  • Creator channel Shorts tabs/sections
  • Per-surface toggle (single global on/off only)
  • Redirecting or rewriting /shorts/ URLs

Installation (Load Unpacked)

  1. Clone or download this folder.
  2. Open Chrome → chrome://extensions/.
  3. Enable Developer mode (top-right toggle).
  4. Click Load unpacked and select the cloned folder (the one with manifest.json).
  5. The red circle icon should appear in your toolbar.

Usage

Click the extension icon to open the popup. Use the toggle to enable or disable filtering. Changes take effect immediately without reloading the page.

How It Works

  • A content script (src/content.js) runs on every YouTube page.
  • It detects the current page type and hides Shorts-related elements using CSS display: none.
  • A MutationObserver re-scans when YouTube dynamically loads new content.
  • YouTube SPA navigations are detected via the yt-navigate-finish event plus a URL-polling fallback.
  • Elements are hidden (not deleted) so the extension can cleanly reverse its changes when disabled.

Selector Strategy

All YouTube-specific selectors are centralized in src/selectors.js. Detection favors:

  1. /shorts/ in link hrefs — the most stable signal
  2. "Shorts" text in shelf titles — catches labeled sections
  3. Renderer tag names (ytd-reel-shelf-renderer, ytd-rich-shelf-renderer) — YouTube's component names

When YouTube changes its markup, update src/selectors.js first.

Diagnostics

When enabled, the extension logs to the console with a [NoShorts] prefix:

  • SPA navigation detected — route change detected and filters reapplied
  • N Shorts hidden on "surface" — periodic count (every 30 s)
  • Enabled on "surface" but 0 Shorts hidden — possible selector breakage

File Structure

.
├── manifest.json          # MV3 extension manifest
├── src/
│   ├── content.js         # Main filtering engine
│   ├── selectors.js       # Centralized selector definitions
│   └── state.js           # Storage-backed enabled state
├── popup/
│   ├── popup.html         # Toggle UI
│   ├── popup.js           # Popup logic
│   └── popup.css          # Popup styles
├── icons/
│   ├── icon16.png
│   ├── icon48.png
│   └── icon128.png
└── README.md

Adding a New Target Surface

  1. Add route detection in currentSurface() inside src/content.js.
  2. Add selectors/heuristics in src/selectors.js.
  3. Add a filter function in src/content.js and call it from runFilters().
  4. Update this README.

License

MIT. See LICENSE.

Not affiliated with or endorsed by YouTube or Google.

About

Chrome extension that hides YouTube Shorts from the home feed, subscriptions, search, watch-page sidebar and navigation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages