<?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: Abdulqodir Miraliyev</title>
    <description>The latest articles on DEV Community by Abdulqodir Miraliyev (@almali).</description>
    <link>https://dev.to/almali</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%2F4017852%2Fd20c5c2f-c3e0-432a-97e2-bd70e39cd0a3.png</url>
      <title>DEV Community: Abdulqodir Miraliyev</title>
      <link>https://dev.to/almali</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/almali"/>
    <language>en</language>
    <item>
      <title>I built a Chrome extension that drag-and-drops YouTube videos into playlists using AI</title>
      <dc:creator>Abdulqodir Miraliyev</dc:creator>
      <pubDate>Mon, 06 Jul 2026 13:20:30 +0000</pubDate>
      <link>https://dev.to/almali/i-built-a-chrome-extension-that-drag-and-drops-youtube-videos-into-playlists-using-ai-42d5</link>
      <guid>https://dev.to/almali/i-built-a-chrome-extension-that-drag-and-drops-youtube-videos-into-playlists-using-ai-42d5</guid>
      <description>&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;I have hundreds of saved YouTube videos scattered across playlists. Every time I find something worth saving, I have to: open the video, click "Save", scroll through a list of playlists, find the right one, click it. Repeat dozens of times a day.&lt;/p&gt;

&lt;p&gt;I wanted something faster — ideally just &lt;em&gt;drag and drop&lt;/em&gt;.&lt;/p&gt;

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

&lt;p&gt;I built &lt;strong&gt;Tortma&lt;/strong&gt; — a Chrome extension that puts a floating overlay on youtube.com. You drag any video thumbnail onto it, and the AI suggests which of your existing playlists it belongs to. You confirm with one click.&lt;/p&gt;

&lt;p&gt;The whole thing takes under 2 seconds per video.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works technically
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Drag-and-drop detection&lt;/strong&gt;&lt;br&gt;
Content script listens for &lt;code&gt;dragstart&lt;/code&gt; on video thumbnails. When a drop event hits the overlay, it extracts the video title and channel name from the DOM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. YouTube Data API v3&lt;/strong&gt;&lt;br&gt;
The extension uses Google OAuth to fetch the user's actual playlists. This means AI suggestions are personalized — it knows your real playlist names and descriptions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. AI matching&lt;/strong&gt;&lt;br&gt;
The video metadata + playlist list gets sent to a backend endpoint. An LLM does semantic matching and returns the best playlist match with a confidence score.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Manifest V3&lt;/strong&gt;&lt;br&gt;
Built on MV3 for future Chrome compatibility. Service worker handles auth token refresh.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tricky parts
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OAuth flow in MV3&lt;/strong&gt; — The &lt;code&gt;chrome.identity&lt;/code&gt; API behaves differently than in MV2. Had to handle token refresh carefully in the service worker.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drag events on YouTube&lt;/strong&gt; — YouTube's own drag handlers conflict. Had to use &lt;code&gt;capture: true&lt;/code&gt; on event listeners and call &lt;code&gt;stopPropagation&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI accuracy&lt;/strong&gt; — First version just used the playlist name. Adding the playlist description and recent video history improved match accuracy significantly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Chrome Extension (MV3) — content script, service worker, popup&lt;/li&gt;
&lt;li&gt;YouTube Data API v3&lt;/li&gt;
&lt;li&gt;Google OAuth 2.0&lt;/li&gt;
&lt;li&gt;Backend API for AI matching&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;It's live on the Chrome Web Store: &lt;a href="https://chromewebstore.google.com/detail/fmjfpejhfgkehebmcjakjkkdhchdmpce" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/fmjfpejhfgkehebmcjakjkkdhchdmpce&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Free tier: 20 videos/day. Would love feedback on the UX or any edge cases you hit!&lt;/p&gt;

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