Search CodeHorizon

Products

CSS Class HighlighterChrome extension · Live ShopGradeChrome extension + web app · Live SecureVaultAndroid app · Live Companion AIAndroid app · Live Speaker CleanerAndroid app · Live NickedAndroid game · Live CompassAndroid app · In testing TubeFocusChrome extension · Live KeeptakeChrome extension · Live TabClusterPast Chrome extension · Past project NotiloPast Chrome extension · Past project

Insights

Android now checks who built an app before it installs itAndroid WebMCP lets your website hand AI agents a proper set of toolsWeb and AI Your next customer might be an AI agent. Here is what it reads in your storeShopify Manifest V2 is gone. This is what a Chrome extension looks like nowChrome extensions Google sends fewer clicks now. Here is how a business website should adaptSearch

Pages

HomeThe studio ServicesWebsites, stores, extensions and apps Case studiesSelected work ProcessHow a project runs All productsThe complete collection InsightsPlatform changes, explained JournalEvery release, newest first Start a projectPlan it in a minute
move openEsc close

TubeFocus

Chrome extensionLive

YouTube, without the rabbit hole.

Choose Learn, Watch or Explore to hide YouTube distractions while keeping the parts you need. Take a 60-second Peek, then return to your focus view automatically.

Platform
Desktop Chrome
Version
7.0.2
Updated
11 Oct 2026
Price
Free
Role
Sole developer
Timeline
Jul to Dec 2024
Stack
JavaScriptManifest V3Service Workerschrome.alarmschrome.storageNode test runnerPlaywright

Demo

A little less noise. In action.

Choose Learn to hide distractions, take a 60-second Peek, and see your focus view return automatically. Watch it happen on an original example page.

Silent demo with on-screen explanations. The middle of the Peek countdown is sped up.

Watch on YouTube

The problem

Why TubeFocus exists

You open YouTube for one tutorial and surface forty minutes later, three recommendations deep. Blocking YouTube entirely is not the answer; it is useful. The feed around the video is the problem.

Before

  • Recommendations on every screen
  • Shorts shelves pulling you sideways
  • End screens queuing up the next video

With TubeFocus

  • A view chosen for your intention
  • A quick Peek when you need it
  • An automatic return to focus
The hardest part
A focus timer and a 60-second Peek that keep running after the popup closes and Chrome puts the extension to sleep, without touching your saved switches.

How it works

How you use it, step by step.

From installing it to the result you are after.

  1. Choose Learn, Watch or Explore in TubeFocus 7.0.2
  2. A timed focus session using your chosen recipe
  3. Peek for 60 seconds, then return to focus automatically
Choose Learn, Watch or Explore in TubeFocus 7.0.2
Choose Learn, Watch or Explore in TubeFocus 7.0.2
A timed focus session using your chosen recipe
Peek for 60 seconds, then return to focus automatically

Under the hood

How it is built.

A Manifest V3 extension with a Material 3 Expressive popup. Three recipes decide what stays on YouTube, and under them the home feed, left navigation, Shorts shelves, comments, suggestions, end cards and video details can each be switched on their own.

A content script applies the rules as YouTube changes the page, and puts things back when a Peek or a session ends. The timer runs in the service worker on chrome.alarms, with its state in chrome.storage, so it survives the browser putting it to sleep. Nothing leaves the device.

  1. 01

    Popup

    Recipes, sessions and Peeks

    Choose Learn, Watch or Explore, start a focus session, or take a 60-second Peek. The popup only asks for changes; it never writes settings itself.

  2. 02

    Settings store

    Shared, validated, synced through Chrome

    Settings are validated before they’re kept and synced through Chrome. A Peek’s deadline stays on this browser and is left out of exports.

  3. 03

    Service worker

    Settings and Peek updates, one at a time

    Every change goes through one queue in the service worker, applied one at a time. Deadlines are kept as times, not timers, so a session outlasts Chrome putting the worker to sleep.

  4. 04

    Content script

    Hides parts of YouTube, and restores them

    It hides what your recipe turns off and puts it back when a Peek or a session ends, and repairs the page as YouTube redraws it.

01

A Peek that can’t lose your settings

A Peek reveals hidden parts and pauses Shorts redirection for 60 seconds. Its deadline survives closing the popup, stays on this browser and is left out of settings exports, so your recipe and focus deadline are never touched.

02

Sessions that respect what you set

Starting a session from your own switches uses Watch for the session, and puts your switches back when it ends. Changing recipe mid-session keeps the deadline.

03

Saves that can’t collide

The service worker applies settings and Peek updates one at a time, imports are validated, and observers, timers and export files are cleaned up when they’re done.

04

Tested on the real thing

Version 7.0.2 passes 39 regression tests and 24 checks in real Chrome, including 10,000 DOM changes with node and listener counts holding steady.

JavaScriptbackground.jslines 29 to 48 and 91 to 92
// One writer keeps edits from separate popup/options pages from overwriting one another.
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
  if (message?.type !== 'tubefocus:settings' || sender?.id !== chrome.runtime.id) return;
  // Only extension pages may use this message API for settings writes.
  if (![chrome.runtime.getURL('popup.html'), chrome.runtime.getURL('settings.html')].includes(sender.url)) {
    sendResponse({ ok: false, error: 'Open TubeFocus to change settings.' });
    return false;
  }
  let command;
  try { command = parseCommand(message); } catch (error) {
    sendResponse({ ok: false, error: error.message });
    return false;
  }
  if (pendingWrites >= MAX_PENDING_WRITES) {
    sendResponse({ ok: false, error: 'Too many changes. Please wait a moment and try again.' });
    return false;
  }
  pendingWrites++;
  const operation = writeQueue.then(async () => {
    const current = await readSettings();
    // … the command, applied to the settings it just read, and saved …
  });
  writeQueue = operation.catch(() => {});
From the sourceOne writer for every settingThe popup and the settings page only ask. The service worker applies each change one at a time, so two pages can never overwrite each other, and it caps how many can wait.

Decisions

The calls I made, and what they cost.

Each decision lists the reason for it and what it gave up.

  1. 01

    Inject CSS instead of removing DOM nodes

    Why

    Toggling a stylesheet is instant and safe to repeat. Removing nodes from YouTube’s component tree breaks easily.

    Trade-off

    The elements are still in the DOM, just hidden.

  2. 02

    Service worker + chrome.alarms for the timer

    Why

    MV3 has no persistent background page, and setTimeout stops silently when the worker sleeps.

    Trade-off

    Worker state is wiped between wake-ups, so the timer keeps everything in storage.

A bug worth telling

A timer that stopped when no one was looking

What happened
The focus timer stopped, with no error, once Chrome had put the extension to sleep.
Why
The alarm still fired, but the service worker had been shut down in between, and the time left had only lived in its memory.
The fix
All of the timer’s state moved into chrome.storage. The worker reads it back every time it wakes, so nothing depends on memory.

What I tried first

  • Removing YouTube’s elementsTaking the sidebar out of the page worked until the next client-side navigation, when YouTube rendered it again. A stylesheet survives re-renders, because it doesn’t touch the DOM.
  • setInterval for the timerIn an MV3 service worker it stops cold when the worker is suspended, without a warning. chrome.alarms survives it.

What I learned

  • YouTube’s markup changes without notice. Every selector needs fallbacks.
  • Chrome Web Store review checks every permission, so each one needs a clear reason in the listing.

Screens

What it looks like.

01 / 05
01Choose Learn, Watch or Explore in TubeFocus 7.0.2
02Peek for 60 seconds, then return to focus automatically
03A timed focus session using your chosen recipe
04Fine-tune the parts of YouTube that stay visible
05Appearance, preferences and settings backups

Features

What you get.

01

Focus recipes

Learn, Watch and Explore make it easy to choose how you want to use YouTube.

02

60-second Peek

Bring hidden sections back briefly. TubeFocus restores your selected view automatically.

03

Recipe-aware focus timer

Keep your intention in place for 15 to 60 minutes, even after closing the popup.

04

Shorts redirect

Optionally open Shorts in the regular watch player.

05

Fine-tune your view

Control feeds, Shorts, comments, suggestions, end screens and video details individually.

06

Your settings, saved

Sync preferences through Chrome, choose a light or dark theme, and export or import a settings backup.

Your data

Free, with no account, ads, tracking or analytics. Preferences and focus deadlines use Chrome storage; the Peek deadline stays local to this browser. Not affiliated with YouTube or Google.

Questions

Good questions.

Something else? Ask me directly.

Does TubeFocus block YouTube?

No. It hides only the parts you pick, such as recommendations, Shorts, the sidebar, comments or end screens, and leaves the video player alone.

What does Peek do?

Peek reveals your hidden sections for 60 seconds, then restores your selected view. The deadline keeps running after you close the popup, and your saved switches stay intact.

What happens when the focus timer ends?

The timed session ends and TubeFocus returns to your saved visibility settings. Closing the popup does not restart or cancel the deadline.

Does it collect any data?

No. There is no data collection, tracking or analytics. Your settings are saved with Chrome sync storage so they follow your Chrome sign-in.

Is it free?

Yes, TubeFocus is free. It is not affiliated with YouTube or Google.

Milestones

From the first line to today.

  1. Jul to Dec 2024

    First version

    Hides recommendations, Shorts and comments, with a focus timer that survives the browser putting it to sleep.

  2. 20 Mar 2026

    6.3

    One click hides every distraction for 15 to 60 minutes with a live countdown, Shorts play as regular videos, and the popup is redesigned in Material 3.

  3. 11 Oct 2026

    7.0.2

    Learn, Watch and Explore recipes, a 60-second Peek, and a roomier Material 3 Expressive interface with a new focus-dial icon.

  1. Updatev7.0.2

    TubeFocus adds focus recipes and a 60-second Peek

    Choose Learn, Watch or Explore, reveal hidden sections briefly, and return to focus automatically.

    • Three recipes keep useful parts of YouTube available for your intention.
    • Peek returns to your saved view after 60 seconds.
    • A roomier Material 3 Expressive interface, new focus-dial icon and improved timer and settings reliability.
  2. Updatev6.3

    TubeFocus 6.3: focus mode with a live countdown

    One click hides every distraction on YouTube for 15 to 60 minutes, and you can watch the time tick down.

    • A cleaner popup, redesigned in Google's Material 3 style.
    • Turn Shorts into regular videos, so they stop auto-scrolling.
    • More precise hiding, so only the distractions go.

For businesses

Like how TubeFocus turned out? I can build yours.

Websites, Shopify stores, Chrome extensions and Android apps, designed and engineered with the same care as my own products.

Booking new projects

Tell me what you’re building.

I read every message myself and reply within a day or two with honest next steps.

  1. 01You share the ideaA few lines is plenty. Links to anything similar help.
  2. 02We talk it throughOne short conversation by email or a quick call.
  3. 03You get a clear planScope, timing and a price that fits, before any work starts.
Just say helloFour fields, that is all

Your details come straight to my inbox and are only used to reply. Nothing is stored on this site or shared.

Project plannerTakes about a minute
01What do you need?Pick any that fit. Skip it for a quick hello.
02Budget
03Timeline
04Tell me about it

Your details come straight to my inbox and are only used to reply. Nothing is stored on this site or shared.