<?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: Kaprojennoe</title>
    <description>The latest articles on DEV Community by Kaprojennoe (@kaprojennoe).</description>
    <link>https://dev.to/kaprojennoe</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%2F4176898%2F10023737-4e47-4420-8cd7-df74af8af25d.jpg</url>
      <title>DEV Community: Kaprojennoe</title>
      <link>https://dev.to/kaprojennoe</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kaprojennoe"/>
    <language>en</language>
    <item>
      <title>Spending fewer LLM calls in an ad-hiding Chrome extension: from 7.6 to 2.2 checks per page</title>
      <dc:creator>Kaprojennoe</dc:creator>
      <pubDate>Sun, 11 Oct 2026 11:22:27 +0000</pubDate>
      <link>https://dev.to/kaprojennoe/spending-fewer-llm-calls-in-an-ad-hiding-chrome-extension-from-76-to-22-checks-per-page-3okp</link>
      <guid>https://dev.to/kaprojennoe/spending-fewer-llm-calls-in-an-ad-hiding-chrome-extension-from-76-to-22-checks-per-page-3okp</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Disclosure: this article was written by an AI assistant on behalf of AdShy's developer, Kaprojennoe, at his request, from his release notes and test data. He reads the comments too.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;AdShy is a Chrome MV3 extension by indie developer Kaprojennoe. It hides ad blocks on two levels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;local rules for labelled ads;&lt;/li&gt;
&lt;li&gt;an opt-in check for unlabelled "maybe-ads" by the Jev classifier model (by TypeSafe), called through OpenRouter.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Version 0.1.22 worked, but it spent about 7.6 LLM checks per page. The free 200/day quota ran out after about 27 pages.&lt;/p&gt;

&lt;p&gt;What changed in 0.1.23:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Per-page cap of 6.&lt;/strong&gt; Strong signals and on-screen blocks go first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lazy candidates.&lt;/strong&gt; Off-screen blocks wait until the reader scrolls near them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No checks on HTTP ≥400 pages.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-domain backoff.&lt;/strong&gt; After 8 or more "not an ad" answers and 0 "ad" answers in 24 h, the cap drops to 2.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-filter.&lt;/strong&gt; Same-site house promos, sticky elements with no other signal, and srcless or known-embed iframes are never sent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Menus are excluded.&lt;/strong&gt; Text links in site menus are never candidates.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Results on a live 40-site run (34 reachable):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;0.1.22&lt;/th&gt;
&lt;th&gt;0.1.23&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AI checks / page&lt;/td&gt;
&lt;td&gt;7.6&lt;/td&gt;
&lt;td&gt;2.2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Visible ad iframes&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;False positives (manual)&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost / 1000 page views&lt;/td&gt;
&lt;td&gt;~$0.14–0.18&lt;/td&gt;
&lt;td&gt;~$0.04&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Note: 0.1.23 is in Chrome Web Store review at the time of writing; the store currently serves 0.1.22.&lt;/p&gt;

&lt;p&gt;One gotcha: a site's &lt;code&gt;!important&lt;/code&gt; utility classes (&lt;code&gt;.d-block-lg&lt;/code&gt;) overrode the hiding CSS. The fix was an id-weight selector in the extension stylesheet.&lt;/p&gt;

&lt;p&gt;Try it: &lt;a href="https://adshy.asistbot.ru/" rel="noopener noreferrer"&gt;https://adshy.asistbot.ru/&lt;/a&gt; (demo: &lt;a href="https://adshy.asistbot.ru/demo" rel="noopener noreferrer"&gt;https://adshy.asistbot.ru/demo&lt;/a&gt;). Install from the Chrome Web Store: &lt;a href="https://chromewebstore.google.com/detail/dlnojfboliachccapaogiilmjopniohl" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/dlnojfboliachccapaogiilmjopniohl&lt;/a&gt; . Privacy details: &lt;a href="https://adshy.asistbot.ru/privacy" rel="noopener noreferrer"&gt;https://adshy.asistbot.ru/privacy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AdShy is an independent project and is not affiliated with TypeSafe, OpenRouter or Google.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>chrome</category>
      <category>extensions</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
