<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jan Kühn</title>
    <description>The latest articles on DEV Community by Jan Kühn (@codingismynewgaming).</description>
    <link>https://dev.to/codingismynewgaming</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4248093%2Fd7ce62ec-cb94-4a3b-abc5-15ea52557408.png</url>
      <title>DEV Community: Jan Kühn</title>
      <link>https://dev.to/codingismynewgaming</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codingismynewgaming"/>
    <language>en</language>
    <item>
      <title>How I decide that a YouTube tile was actually scrolled past, without using watch history</title>
      <dc:creator>Jan Kühn</dc:creator>
      <pubDate>Mon, 16 Nov 2026 16:50:07 +0000</pubDate>
      <link>https://dev.to/codingismynewgaming/how-i-decide-that-a-youtube-tile-was-actually-scrolled-past-without-using-watch-history-3h51</link>
      <guid>https://dev.to/codingismynewgaming/how-i-decide-that-a-youtube-tile-was-actually-scrolled-past-without-using-watch-history-3h51</guid>
      <description>&lt;p&gt;I got annoyed at a narrow thing on YouTube. I would scroll the home feed, skip a row of tiles on purpose, and then see the same ones come back a minute later.&lt;/p&gt;

&lt;p&gt;Watch history does not help here, because I never opened those videos. Hiding the homepage also misses the point, because I still want the feed. I just wanted the repeats to fade back.&lt;/p&gt;

&lt;p&gt;So I built a small browser extension that dims those tiles. The interesting part for me was not the overlay. It was deciding when a tile counts as seen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Seen is not watched
&lt;/h2&gt;

&lt;p&gt;I need to be precise, because the name can be read the wrong way. Seen, in this project, means I already had a real look at a tile and moved on. It does not mean I watched the video.&lt;/p&gt;

&lt;p&gt;If I used YouTube's watched state, the whole idea would collapse. The tiles that bother me are the ones I refused to open.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule I ended up with
&lt;/h2&gt;

&lt;p&gt;I watch tiles with IntersectionObserver and MutationObserver. The content script does not scan the page on an interval.&lt;/p&gt;

&lt;p&gt;On Home, Subscriptions, Search, and the watch sidebar, a tile is marked only if it stays in the viewport for at least two seconds and then stays out of the viewport for two seconds. If I just flick past a row, nothing happens.&lt;/p&gt;

&lt;p&gt;If I click or open a video, that ID is stored as watch intent and stays clear. The main player is never dimmed.&lt;/p&gt;

&lt;p&gt;Shorts needed a separate rule. A Short does not leave the viewport the way a feed card does, so the current Short is marked after two seconds on screen.&lt;/p&gt;

&lt;p&gt;Hidden or background tabs pause tracking. A tile sitting in an unread tab should not be silently marked.&lt;/p&gt;

&lt;p&gt;The dim itself is visual only: grayscale plus an overlay, with strength from 0 to 100 percent. Context menus still work. There is no mode that removes tiles from the layout. Filter, in the name, means this visual filter, not a hide from the feed switch.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;The first version in my head was simpler: if a tile appeared, mark it. That was too aggressive. Fast scrolling would have dimmed things I never really saw.&lt;/p&gt;

&lt;p&gt;The two plus two second rule is a compromise. It is not a model of attention. It is just strict enough that a glance has to be real, and loose enough that I do not have to click Reset every evening.&lt;/p&gt;

&lt;p&gt;I also learned that "hide watched" is the wrong comparison. Those tools follow a different signal. I kept that distinction in the FAQ, because it is the question I would ask if I found this in a store.&lt;/p&gt;

&lt;p&gt;Keeping all state in local storage was a deliberate limit. Video IDs, timestamps, and settings stay in the browser. Seen and watch intent entries expire after 65 days. There is no account and no server of mine. The permissions are storage, tabs, webNavigation, and youtube.com, so the extension can keep that history locally, notice in-page navigation, and apply the dim.&lt;/p&gt;

&lt;p&gt;The project is deliberately small. I do not want analytics, remote code, or extra host permissions without a very good reason.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where I am unsure
&lt;/h2&gt;

&lt;p&gt;I have not tested every combination with other YouTube extensions. This one only dims tiles, so it should be able to sit next to tools that hide the homepage or Shorts. If that turns out to be messy in practice, I want the details, not a guess.&lt;/p&gt;

&lt;p&gt;I am also not sure yet how often the two second thresholds are wrong for other people. Too early is as annoying as too late. That is the feedback I actually need.&lt;/p&gt;

&lt;p&gt;The extension is called Dim + Filter Seen YouTube Videos. It used to be called YouTube Attention Cleaner. It is free, MIT licensed, and live for Chrome, Firefox, and Edge, currently at version 1.1.0.&lt;/p&gt;

&lt;p&gt;If you read the code or try it, I am interested in mistakes in the visibility logic, and in cases where a tile is dimmed that should not be.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/codingismynewgaming/youtube-attention-cleaner" rel="noopener noreferrer"&gt;https://github.com/codingismynewgaming/youtube-attention-cleaner&lt;/a&gt;&lt;br&gt;
Chrome: &lt;a href="https://chromewebstore.google.com/detail/dim-+-filter-seen-youtube/idefplgokaljonmomjlnffdafbkeghdc" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/dim-+-filter-seen-youtube/idefplgokaljonmomjlnffdafbkeghdc&lt;/a&gt;&lt;br&gt;
Firefox: &lt;a href="https://addons.mozilla.org/firefox/addon/youtube-attention-cleaner/" rel="noopener noreferrer"&gt;https://addons.mozilla.org/firefox/addon/youtube-attention-cleaner/&lt;/a&gt;&lt;br&gt;
Edge: &lt;a href="https://microsoftedge.microsoft.com/addons/detail/dim-filter-seen-youtube/elninnhnjkgnijodneiadkkhhgcmpooj" rel="noopener noreferrer"&gt;https://microsoftedge.microsoft.com/addons/detail/dim-filter-seen-youtube/elninnhnjkgnijodneiadkkhhgcmpooj&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI assistance and reviewed by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
