Anti Brainrot

The anti brain rot extension for Chrome and app for Android.

Puts the things that eat your day behind a friction timer: feeds and Shorts on YouTube, the feeds of TikTok, Instagram, X, Reddit and the rest, adult sites and their media, the searches you have banned, and on the phone whole apps. Each one is blocked outright or paused with a countdown and a timed pass; safe search is forced on every engine while the adult filter is on. The filter locks itself during your focus hours and can be made hard to remove. Everything is a setting; the defaults carry the opinion, the timer carries the friction.

Install Source on GitHub

What it does

How the timer works

  1. With the filter off, pick an unlock delay in the popup and press Turn on.
  2. To turn the filter off, press the power button. A countdown of that length starts inside the popup.
  3. Keep the popup open until it reaches zero. Closing it, clicking away or pressing Keep it on cancels the countdown and the filter stays on.
  4. When the countdown ends the filter turns off and every toggle becomes editable again.

Every toggle, Hide Shorts included, goes off with the filter and comes back with it.

The popup with the filter on: a list of toggles such as Hide Home Feed, Hide Video Sidebar, Hide Shorts and Hide Comments
The popup with the filter on.
The popup with the filter off: a panel that reads Filter is off, an unlock delay picker set to 30 seconds, and a Turn on button above the greyed-out toggles
With the filter off, you pick the delay and turn it on.
A YouTube watch page replaced by a card that reads Not on your list, explaining that the video is filed under Music and that educational mode only plays Education, Science and Technology, and Howto and Style
A watch page stopped by educational mode. The video is paused and the category is shown.

Educational videos only

YouTube assigns every video one of 15 categories. Anti Brainrot reads that category on the watch page and compares it with your allow list. Videos from allowed channels always play.

Limits worth knowing

  • Feeds and search results still list every video. The gate is the watch page. You can search freely; you just cannot watch what is not allowed.
  • Category is set by the uploader. Some educational content sits in People and Blogs or Entertainment. Add those channels to the allow list.
  • A video whose category cannot be read stays blocked.
The options page: Educational videos only with a grid of category checkboxes, Education and Science and Technology ticked, a text box for always allowed channels, and below it the Block adult sites section
Categories and channels are set in the options.

Adult site blocker

Off by default. Switching it on asks Chrome for permission to act on all sites, because a redirect rule cannot work otherwise. The list is generated from public blocklists intersected with the Tranco top million, plus a curated core, and ships inside the extension. Navigations to a listed site land on the block page; the images, video, frames and scripts a listed site serves are blocked on every other page, so a forum or a results page cannot show them. Two switches sit under the filter, both on by default: Force safe search adds each engine's strict parameter to every search, the same one Chrome's own policy uses, and Restrict YouTube sends YouTube's Restricted Mode header with every request. A blocked keywords list, its own switch, catches any address that carries one of your words.

Limits worth knowing

  • It is a browser extension rule, not a network filter. Other browsers and apps on the machine are not affected.
  • No filter here judges a picture by its content. A page that is not on the list, not a search engine and has no blocked word in its address still shows what it shows.
  • No list is complete. Sites it misses can be added in the options; sites it catches by mistake can be allowed there. Allowed sites win over blocked ones.
  • Allowing a site, like every other loosening, waits until the filter is off.
The block page on a sky blue background: a card that reads Not now, Anti Brainrot blocked example.com, with a Keep it blocked button
A blocked site lands here.

Distracting sites

Pick presets in the options or write patterns of your own: site.com for the whole site, site.com/ for its front page only, site.com/path for everything under a path. Exceptions keep the useful corner of a blocked site open.

In pause mode a countdown stands between you and the site. It restarts if you switch tabs. Write a one-line intention if you turned that on, then continue for a few minutes. Passes are charged up front against a daily budget, the site turns grayscale while the pass runs, a warning appears thirty seconds before it ends, and the same site cools down before it offers another pass. In block mode there is no pass at all.

Full page loads are stopped before any request is made. In-app navigation is caught by a small watcher that only runs on the sites you enabled.

Locked hours

Set days and a window in the options. During the window the filter turns itself on within a minute and the power button is disabled. Not even the countdown can turn it off.

Lock for N hours in the popup does the same for an ad hoc stretch. Widening a lock is immediate; narrowing one waits until the filter is off, like every other loosening.

Small nudges

  • A reason line you write once and see on every block page and in the popup.
  • A count of today's blocks and passes in the popup.
  • Hide Shorts is on by default and behaves like every other toggle.

On the phone

The Android app is an app blocker in the spirit of AppBlock, built with the phone's own tools. Every app and every site on your list gets its own rule. Blocked ones get a block screen the moment they open. Timed ones get a daily limit: they open on their own, only the time they are in front counts, so a limit of thirty minutes is thirty minutes of use, and a pause with an intention line can stand before them if you want that. When the minutes are gone they stay blocked until midnight. Rules follow the package name, so an uninstalled app comes back with its rule, and an optional install block keeps the app stores and the package installer shut while the filter is on. Sites are caught in the address bar of Chrome, Firefox, Samsung Internet, Brave, Edge, Opera, Vivaldi and DuckDuckGo. A DNS-only VPN answers lookups for adult hosts and blocked sites with "no such name", answers Google search, Bing, DuckDuckGo and YouTube with the addresses of their forced safe search hosts while you want that, and forwards everything else to the network's resolver, so no traffic leaves the phone through the app. A blocked keywords list puts the block screen over any page whose address carries one of your words. The friction timer, locked hours, Lock for N hours and the loosen-only-while-off rule are the same as in the extension. Strict mode closes the Settings pages that could disable the app while the filter is on, and Prevent uninstall makes the app a device admin that Android refuses to remove. A minute before a timer runs out, a notification says so. The Progress tab keeps ninety days of counters: how long the filter was on, block screens, time in timed apps and sessions, as totals over 7, 30 or 90 days, bars per day, a streak, and the apps that used the most time or needed the most block screens.

The Home tab of the Android app: a blue card that reads Filter is on with a power ring, a Lock for row and a Turn off button, then today's three numbers and the locked hours card
Home, with the filter on.
The Progress tab: a 7, 30, 90 day selector, four tiles with the filter-on time, block screens, time in timed apps and sessions, and a bar chart of hours per day
Progress over the last 7 days.
The block screen over a timed app: Take a breath, Chrome has a limit of 5 minutes a day, a ring that reads Ready, an intention field, 4m left today and a Continue for 4m button next to Keep it blocked
A timed app, before a session.

Prevent removal

On the phone, Prevent uninstall makes the app a device admin that Android refuses to remove. Chrome gives an extension no such hook, so the extension does it in two layers.

In the extension

Switch on Prevent removal in the popup; Chrome asks for the tabs permission once. While it and the filter are on, the extensions page, where the Remove button and the on/off switch live, is sent to a block page as soon as it opens, the way strict mode leaves App info on the phone. Your other extensions stay reachable: a Manage extensions button under the switch runs the unlock delay, then opens the page for five minutes. Turning the feature off waits until the filter is off.

The toolbar icon's own Remove from Chrome menu still works. That is the door only a policy can close.

With a browser policy

Chrome lets an administrator force-install an extension. A force-installed extension has no Remove button, no on/off switch and no toolbar removal, and Chrome keeps it updated by itself. The policy is one file that needs administrator rights to create and to delete, which is the point.

  1. On Linux, create /etc/opt/chrome/policies/managed/anti-brainrot.json (for Chromium, /etc/chromium/policies/managed/) with this content. The options page shows a one-line command that does it.
    {
      "ExtensionInstallForcelist": [
        "ibcicobbbpfmonjbhpmllnjgdkedneop;https://danieltyukov.github.io/anti-brainrot/updates.xml"
      ]
    }
  2. Restart Chrome, or open chrome://policy and click Reload policies. Chrome downloads the CRX attached to the release that updates.xml on this site names, replaces the copy you loaded unpacked (your settings carry over, they are keyed by the pinned extension id) and marks it "installed by your administrator".
  3. The options page reports "installed by policy" once that took effect.

To undo, delete the file and restart Chrome. Chrome then removes the extension.

Install

Android

Download anti-brainrot-<version>.apk from the latest release on the phone, open it, allow installing from that source, then follow the Setup screen: it asks for the accessibility service and Display over other apps (both required), and on Android 13 or later it explains the Allow restricted settings step for sideloaded apps. Android 8 or newer.

Chrome

Chrome Web Store: coming soon.

Until then, install it from a release:

  1. Download the zip from the latest release.
  2. Unzip it.
  3. Open chrome://extensions.
  4. Turn on Developer mode, top right.
  5. Click Load unpacked and pick the unzipped folder, the one that contains manifest.json.

Pin the leaf icon to the toolbar. The filter is on from the first moment.

Needs Chrome 111 or newer, or any Chromium browser with Manifest V3 and :has() support, such as Edge, Brave, Arc or Vivaldi. Every release also carries a signed .crx for the policy install.

Download the latest release

Privacy

Your settings are stored in Chrome's sync storage and nothing else is stored.

Nothing is sent to the author or to any third party: no analytics, no telemetry, no update check beyond what Chrome itself does for extensions.

The only request the extension makes of its own is a same-origin fetch of a YouTube watch page, when educational mode needs a category the page did not expose.

Full privacy page

Source

MIT licensed. Plain files, no build step, no dependencies. Load the extension folder unpacked and it runs as is.

YouTube changes its markup regularly. When something reappears, open an issue and it gets a selector fix.

Repository
Issues