VibeKoding / Level 3 ยท MasterLevel 3 ยท Master / Ekstensi Asisten Browser AI (Chrome / Edge)Ekstensi Asisten Browser AI (Chrome / Edge)
VK

Ekstensi Asisten Browser AI (Chrome / Edge)Ekstensi Asisten Browser AI (Chrome / Edge)

๐Ÿ“š Level 3 ยท MasterLevel 3 ยท Master ๐ŸŒ Dual Bahasa (ID / EN) โšก VibeKoding Native

Modul master Level 3 VibeKoding: Ekstensi Asisten Browser AI (Chrome / Edge).Modul master Level 3 VibeKoding: Ekstensi Asisten Browser AI (Chrome / Edge).

In this tutorial, we will complete a full closed loop: build an AI-driven Chrome browser extension from scratch. It can read the content of any webpage you are browsing, then use AI to generate a one-click summary. You will personally complete the extension development, debugging, and learn how to publish it to the Chrome Web Store.In this tutorial, we will complete a full closed loop: build an AI-driven Chrome browser extension from scratch. It can read the content of any webpage you are browsing, then use AI to generate a one-click summary. You will personally complete the extension development, debugging, and learn how to publish it to the Chrome Web Store.

For this tutorial, you should at least have:For this tutorial, you should at least have:

1.1 What Is a Browser Extension?1.1 What Is a Browser Extension?

You have definitely used browser extensions before: ad blockers, translation tools, password managers... They are like "extra gear" for your browser, giving you superpowers while browsing the web.You have definitely used browser extensions before: ad blockers, translation tools, password managers... They are like "extra gear" for your browser, giving you superpowers while browsing the web.

Imagine this: you open a 5,000-word technical blog post, click the extension button once, and a few seconds later a concise Chinese summary appears in the side panel. That is exactly what we are going to build.Imagine this: you open a 5,000-word technical blog post, click the extension button once, and a few seconds later a concise Chinese summary appears in the side panel. That is exactly what we are going to build.

๐Ÿ–ผ๏ธ placeholder: A preview image showing a long article webpage on the left and an AI-generated summary displayed in the Chrome side panel on the rightplaceholder: A preview image showing a long article webpage on the left and an AI-generated summary displayed in the Chrome side panel on the right

๐Ÿ–ผ๏ธ placeholder: A preview image showing a long article webpage on the left and an AI-generated summary displayed in the Chrome side panel on the rightplaceholder: A preview image showing a long article webpage on the left and an AI-generated summary displayed in the Chrome side panel on the right

1.2 The Basic Architecture of a Chrome Extension1.2 The Basic Architecture of a Chrome Extension

Chrome extensions (based on Manifest V3) consist of several core parts, each with its own role:Chrome extensions (based on Manifest V3) consist of several core parts, each with its own role:

Their workflow looks like this:Their workflow looks like this:

text
User clicks the extension icon -> Side panel opens -> User clicks the "Summarize" button -> Side panel notifies the Service Worker -> Service Worker asks Content Script to read page text -> Content Script returns page content -> Service Worker sends content to AI API -> AI returns the summary -> Service Worker sends the summary back to the side panel for display

๐Ÿ–ผ๏ธ placeholder: An architecture flowchart showing how Content Script, Service Worker, and Side Panel pass messages to each otherplaceholder: An architecture flowchart showing how Content Script, Service Worker, and Side Panel pass messages to each other

๐Ÿ–ผ๏ธ placeholder: An architecture flowchart showing how Content Script, Service Worker, and Side Panel pass messages to each otherplaceholder: An architecture flowchart showing how Content Script, Service Worker, and Side Panel pass messages to each other

1.3 Two AI Options: Cloud API vs Built-in Browser AI1.3 Two AI Options: Cloud API vs Built-in Browser AI

Our extension has two ways to access AI capability:Our extension has two ways to access AI capability:

Option A: Call cloud AI APIs (OpenAI / Claude)Option A: Call cloud AI APIs (OpenAI / Claude)

Option B: Use Chrome built-in AI (Summarizer API)Option B: Use Chrome built-in AI (Summarizer API)

Starting from Chrome 138, Google built AI capability based on Gemini Nano directly into the browser. One of them is the Summarizer API - it runs entirely locally, requires no API Key, no internet, and is completely free.Starting from Chrome 138, Google built AI capability based on Gemini Nano directly into the browser. One of them is the Summarizer API - it runs entirely locally, requires no API Key, no internet, and is completely free.

This tutorial will implement both options, and you can choose based on your own situation.This tutorial will implement both options, and you can choose based on your own situation.

1.4 Tutorial Roadmap1.4 Tutorial Roadmap

We will build a Chrome extension called "AI Page Summarizer" from scratch, following these steps:We will build a Chrome extension called "AI Page Summarizer" from scratch, following these steps:

  1. Build the extension skeleton: create a Manifest V3 project structure and load it into ChromeBuild the extension skeleton: create a Manifest V3 project structure and load it into Chrome
  2. Implement the core feature: Content Script reads the page + Service Worker calls AI API + side panel shows resultsImplement the core feature: Content Script reads the page + Service Worker calls AI API + side panel shows results
  3. Integrate Chrome built-in AI: use Summarizer API to provide free local summarizationIntegrate Chrome built-in AI: use Summarizer API to provide free local summarization
  4. Testing and debugging: learn Chrome extension debugging techniquesTesting and debugging: learn Chrome extension debugging techniques
  5. Publish to Chrome Web Store: package and submit for reviewPublish to Chrome Web Store: package and submit for review
  6. 2.1 Create the Project Structure2.1 Create the Project Structure

    Open your AI coding assistant (Cursor / Trae / Claude Code), create an empty folder named ai-page-summarizer, then enter the following in the chat box:Open your AI coding assistant (Cursor / Trae / Claude Code), create an empty folder named ai-page-summarizer, then enter the following in the chat box:

    text
    Please help me create a Chrome browser extension project using Manifest V3. The project name is ai-page-summarizer, and its function is to summarize webpage content with AI. Please create the following file structure: ai-page-summarizer/ โ”œโ”€โ”€ manifest.json # MV3 manifest file โ”œโ”€โ”€ background.js # Service Worker background script โ”œโ”€โ”€ content.js # Content script (reads webpage text) โ”œโ”€โ”€ sidepanel.html # Side panel HTML โ”œโ”€โ”€ sidepanel.js # Side panel logic โ”œโ”€โ”€ sidepanel.css # Side panel styling โ”œโ”€โ”€ options.html # Settings page โ”œโ”€โ”€ options.js # Settings page logic โ””โ”€โ”€ icons/ # Icons folder Requirements for manifest.json: 1. manifest_version: 3 2. Permissions: storage, activeTab, scripting, sidePanel 3. Use service_worker: "background.js" for background 4. Configure side_panel with default path sidepanel.html 5. Configure default icon and title for action
    

    AI will generate the full project skeleton for you. Let us look at what each file does.AI will generate the full project skeleton for you. Let us look at what each file does.

    2.2 manifest.json: The Extension's "ID Card"2.2 manifest.json: The Extension's "ID Card"

    This is the most important file in a Chrome extension. It tells the browser what the extension is, what permissions it needs, and which components it contains:This is the most important file in a Chrome extension. It tells the browser what the extension is, what permissions it needs, and which components it contains:

    json
    { "manifest_version": 3, "name": "AI Page Summarizer", "version": "1.0", "description": "Use AI to summarize any webpage in one click", "permissions": ["storage", "activeTab", "scripting", "sidePanel"], "background": { "service_worker": "background.js" }, "action": { "default_title": "AI Page Summarizer", "default_icon": { "16": "icons/icon-16.png", "48": "icons/icon-48.png", "128": "icons/icon-128.png" } }, "side_panel": { "default_path": "sidepanel.html" }, "options_page": "options.html", "icons": { "16": "icons/icon-16.png", "48": "icons/icon-48.png", "128": "icons/icon-128.png" } }
    

    Permission explanation:Permission explanation:

    • storage: lets the extension store data such as the user's API Keystorage: lets the extension store data such as the user's API Key
    • activeTab: lets the extension access the current tab the user is viewing (only after user interaction, so it is very safe)activeTab: lets the extension access the current tab the user is viewing (only after user interaction, so it is very safe)
    • scripting: lets the extension inject scripts into pages to read contentscripting: lets the extension inject scripts into pages to read content
    • sidePanel: lets the extension use Chrome side panel APIsidePanel: lets the extension use Chrome side panel API

    ๐Ÿ–ผ๏ธ placeholder: Screenshot of manifest.json in the editorplaceholder: Screenshot of manifest.json in the editor

    ๐Ÿ–ผ๏ธ placeholder: Screenshot of manifest.json in the editorplaceholder: Screenshot of manifest.json in the editor

    2.3 Prepare Icons2.3 Prepare Icons

    Chrome extensions need icons in three sizes: 16x16, 48x48, and 128x128. You can ask AI to generate them:Chrome extensions need icons in three sizes: 16x16, 48x48, and 128x128. You can ask AI to generate them:

    text
    Please help me generate three simple Chrome extension icons (16x16, 48x48, 128x128), with a rounded rectangle, gradient purple background, and a white AI lightning symbol in the center. Save them in the icons/ directory as icon-16.png, icon-48.png, and icon-128.png.
    

    2.4 Load the Extension into Chrome2.4 Load the Extension into Chrome

    Before writing code, let us first load this "empty shell" extension into Chrome, so every later change can be previewed immediately:Before writing code, let us first load this "empty shell" extension into Chrome, so every later change can be previewed immediately:

    1. Open Chrome and enter chrome://extensions/ in the address barOpen Chrome and enter chrome://extensions/ in the address bar
    2. Turn on Developer mode in the top-right cornerTurn on Developer mode in the top-right corner
    3. Click Load unpackedClick Load unpacked
    4. Select your ai-page-summarizer folderSelect your ai-page-summarizer folder
    5. You will see the extension appear in the list, and its icon will show up in the Chrome toolbar.You will see the extension appear in the list, and its icon will show up in the Chrome toolbar.

      ๐Ÿ–ผ๏ธ placeholder: Screenshot of Chrome extensions page showing how to enable developer mode and load an extensionplaceholder: Screenshot of Chrome extensions page showing how to enable developer mode and load an extension

      ๐Ÿ–ผ๏ธ placeholder: Screenshot of Chrome extensions page showing how to enable developer mode and load an extensionplaceholder: Screenshot of Chrome extensions page showing how to enable developer mode and load an extension

      > Tip: after every code change, go back to chrome://extensions/ and click the refresh button (๐Ÿ”„) on the extension card to update it.> Tip: after every code change, go back to chrome://extensions/ and click the refresh button (๐Ÿ”„) on the extension card to update it.

      3.1 Content Script: Read Page Text3.1 Content Script: Read Page Text

      Content Script is a script injected into the webpage. It can directly access the page DOM. We use it to extract page text.Content Script is a script injected into the webpage. It can directly access the page DOM. We use it to extract page text.

      Ask AI to write content.js:Ask AI to write content.js:

      text
      Please help me write content.js with the following functions: 1. Listen for messages from Service Worker 2. When receiving a "getPageContent" message, extract the current page text content 3. Extraction logic: get document.body.innerText, and also get the page title and URL 4. Return the extracted content via sendResponse
      

      AI will generate code like this:AI will generate code like this:

      javascript
      // content.js chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { if (request.action === 'getPageContent') { const content = document.body.innerText || document.body.textContent sendResponse({ content: content.trim(), title: document.title, url: window.location.href }) } return true // Keep the message channel open })
      

      3.2 Service Worker: Call AI API3.2 Service Worker: Call AI API

      Service Worker is the extension's "brain." It coordinates communication among components and calls external AI APIs.Service Worker is the extension's "brain." It coordinates communication among components and calls external AI APIs.

      Ask AI to write background.js:Ask AI to write background.js:

      text
      Please help me write background.js with the following functions: 1. When the user clicks the extension icon, open the side panel 2. Listen for "summarize" messages from the side panel 3. After receiving the message, send "getPageContent" to the content script in the current tab to get page content 4. After receiving the page content, read the user's configured API Key and model selection from chrome.storage.local 5. Call the corresponding AI API according to the configuration (support OpenAI and Claude) 6. Send the AI summary back to the side panel For OpenAI, call https://api.openai.com/v1/chat/completions and use model gpt-4o-mini For Claude, call https://api.anthropic.com/v1/messages and use model claude-sonnet-4-20250514 System prompt: Please summarize the following webpage content in Chinese, extract the key points, and keep it within 300 Chinese characters.
      

      Core code looks like this:Core code looks like this:

      javascript
      // background.js // Open the side panel when the user clicks the icon chrome.sidePanel.setPanelBehavior({ openPanelOnActionClick: true }) // Listen for messages from the side panel chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { if (request.action === 'summarize') { handleSummarize(request.tabId).then(sendResponse) return true // Async response } }) async function handleSummarize(tabId) { // 1. Get page content const [response] = await chrome.tabs.sendMessage(tabId, { action: 'getPageContent' }) // 2. Read user settings const { apiKey, provider } = await chrome.storage.local.get([ 'apiKey', 'provider' ]) if (!apiKey) { return { error: 'Please configure your API Key in the settings page first' } } // 3. Call AI API const summary = provider === 'claude' ? await callClaude(response.content, apiKey) : await callOpenAI(response.content, apiKey) return { summary, title: response.title } }
      

      ๐Ÿ–ผ๏ธ Ekstensi Asisten Browser AI (Chrome / Edge)Ekstensi Asisten Browser AI (Chrome / Edge)

      ๐Ÿ–ผ๏ธ placeholder: Screenshot of background.js code in the editorplaceholder: Screenshot of background.js code in the editor

      3.3 Side Panel UI: Show Summary Result3.3 Side Panel UI: Show Summary Result

      The side panel is the main interaction UI for users. Ask AI to write the HTML, CSS, and JS for the side panel:The side panel is the main interaction UI for users. Ask AI to write the HTML, CSS, and JS for the side panel:

      text
      Please help me write these three files for the side panel: sidepanel.html: - Show the plugin name "AI Page Summarizer" at the top - A blue "Summarize Current Page" button - A loading animation area (hidden by default) - A result display area showing the page title and AI summary - A "Copy Summary" button at the bottom sidepanel.css: - Clean modern design, similar to Notion typography - Width adapts to the side panel - Buttons have hover effects - Loading animation implemented with CSS sidepanel.js: - When clicking the "Summarize" button, get the current tab ID - Send a summarize message to background.js - Show loading animation - Hide loading and display summary after receiving result - Use navigator.clipboard.writeText in the "Copy" button to copy text
      

      ๐Ÿ–ผ๏ธ placeholder: Screenshot of side panel UI showing three states: summary button, loading state, and summary resultplaceholder: Screenshot of side panel UI showing three states: summary button, loading state, and summary result

      ๐Ÿ–ผ๏ธ placeholder: Screenshot of side panel UI showing three states: summary button, loading state, and summary resultplaceholder: Screenshot of side panel UI showing three states: summary button, loading state, and summary result

      3.4 Settings Page: Configure API Key3.4 Settings Page: Configure API Key

      Users need a place to enter their own API Key. Ask AI to write the settings page:Users need a place to enter their own API Key. Ask AI to write the settings page:

      text
      Please help me write options.html and options.js: - A dropdown to choose AI provider (OpenAI / Claude) - A password input for API Key (type="password") - A "Save" button - Save config with chrome.storage.local.set - Read saved config from storage and fill the form on page load - Show "Settings saved" after saving
      

      > Security reminder: the API Key is stored in chrome.storage.local and only kept on the local device. But if you want to publish this extension to the Chrome Web Store for others to use, a safer approach is to build a backend proxy server so the API Key is not exposed directly on the client side.> Security reminder: the API Key is stored in chrome.storage.local and only kept on the local device. But if you want to publish this extension to the Chrome Web Store for others to use, a safer approach is to build a backend proxy server so the API Key is not exposed directly on the client side.

      ๐Ÿ–ผ๏ธ placeholder: Screenshot of settings page showing provider selection and API Key input p1placeholder: Screenshot of settings page showing provider selection and API Key input p1

      ๐Ÿ–ผ๏ธ placeholder: Screenshot of settings page showing provider selection and API Key input p2placeholder: Screenshot of settings page showing provider selection and API Key input p2

      ๐Ÿ–ผ๏ธ placeholder: Screenshot of settings page showing provider selection and API Key input p3placeholder: Screenshot of settings page showing provider selection and API Key input p3

      ๐Ÿ–ผ๏ธ placeholder: Screenshot of settings page showing provider selection and API Key inputplaceholder: Screenshot of settings page showing provider selection and API Key input

      Starting from Chrome 138, Google built AI capability based on Gemini Nano directly into the browser. The one best suited for our case is the Summarizer API - it runs entirely locally, needs no API Key, needs no internet, and is free.Starting from Chrome 138, Google built AI capability based on Gemini Nano directly into the browser. The one best suited for our case is the Summarizer API - it runs entirely locally, needs no API Key, needs no internet, and is free.

      4.1 Check Browser Support4.1 Check Browser Support

      Built-in AI has hardware requirements:Built-in AI has hardware requirements:

      • Desktop Chrome 138+ (Windows 10+, macOS 13+, Linux, ChromeOS)Desktop Chrome 138+ (Windows 10+, macOS 13+, Linux, ChromeOS)
      • 22 GB available storage space (for model download)22 GB available storage space (for model download)
      • 4GB+ GPU VRAM, or 16GB+ system RAM with 4+ CPU cores4GB+ GPU VRAM, or 16GB+ system RAM with 4+ CPU cores

      Enter chrome://flags in Chrome address bar, search for the flag related to Summarization, and ensure it is Enabled.Enter chrome://flags in Chrome address bar, search for the flag related to Summarization, and ensure it is Enabled.

      • In Chrome 131-137, this switch is called Summarization API.In Chrome 131-137, this switch is called Summarization API.
      • In Chrome 138-144, it was renamed to Summarization API for Gemini Nano.In Chrome 138-144, it was renamed to Summarization API for Gemini Nano.
      • In Chrome 145+, Summarization API for Gemini Nano was removed, and its summarization function was integrated into Prompt API for Gemini Nano.In Chrome 145+, Summarization API for Gemini Nano was removed, and its summarization function was integrated into Prompt API for Gemini Nano.

      ๐Ÿ–ผ๏ธ placeholder: Screenshot of chrome://flags showing the Summarization API switchplaceholder: Screenshot of chrome://flags showing the Summarization API switch

      ๐Ÿ–ผ๏ธ placeholder: Screenshot of chrome://flags showing the Summarization API switchplaceholder: Screenshot of chrome://flags showing the Summarization API switch

      4.2 Use Summarizer API4.2 Use Summarizer API

      Ask AI to add built-in AI support in background.js:Ask AI to add built-in AI support in background.js:

      text
      Please help me add Chrome built-in Summarizer API support in background.js: 1. Add a summarizeWithBuiltinAI function 2. First check whether Summarizer.availability() returns 'readily-available' 3. If available, create a summarizer instance, configure type as 'key-points', format as 'markdown', and length as 'medium' 4. Call summarizer.summarize() to summarize 5. In handleSummarize, add a branch for provider === 'builtin'
      

      Core code:Core code:

      javascript
      async function summarizeWithBuiltinAI(text) { // Check availability const availability = await Summarizer.availability() if (availability !== 'readily-available') { throw new Error('Chrome built-in AI is not available. Please check browser version and hardware requirements.') } // Create summarizer const summarizer = await Summarizer.create({ type: 'key-points', format: 'markdown', length: 'medium' }) // Run summary const summary = await summarizer.summarize(text, { context: 'This is a webpage article' }) return summary }
      

      4.3 Update the Settings Page4.3 Update the Settings Page

      Add a "Chrome Built-in AI (Free, No API Key Needed)" option to the provider dropdown in options.html. When users choose it, hide the API Key input because it is no longer needed.Add a "Chrome Built-in AI (Free, No API Key Needed)" option to the provider dropdown in options.html. When users choose it, hide the API Key input because it is no longer needed.

      text
      Please help me modify options.html and options.js: 1. Add an option "Chrome built-in AI (free, no API Key needed)" to the provider dropdown, with value "builtin" 2. Hide the API Key input when builtin is selected 3. Show the API Key input when OpenAI or Claude is selected
      

      ๐Ÿ–ผ๏ธ placeholder: Screenshot of updated settings page showing three AI provider options, with API Key input hidden when Chrome built-in AI is selectedplaceholder: Screenshot of updated settings page showing three AI provider options, with API Key input hidden when Chrome built-in AI is selected

      ๐Ÿ–ผ๏ธ placeholder: Screenshot of updated settings page showing three AI provider options, with API Key input hidden when Chrome built-in AI is selectedplaceholder: Screenshot of updated settings page showing three AI provider options, with API Key input hidden when Chrome built-in AI is selected

      5.1 Local Testing Workflow5.1 Local Testing Workflow

      Debugging Chrome extensions is a bit different from debugging normal webpages:Debugging Chrome extensions is a bit different from debugging normal webpages:

      Debug Service Worker:Debug Service Worker:

      1. Open chrome://extensions/Open chrome://extensions/
      2. Find your extension and click the Service Worker linkFind your extension and click the Service Worker link
      3. A dedicated DevTools window opens where you can see console.log output and network requestsA dedicated DevTools window opens where you can see console.log output and network requests
      4. Debug Side Panel:Debug Side Panel:

        1. Open the side panelOpen the side panel
        2. Right-click inside the side panel contentRight-click inside the side panel content
        3. Choose InspectChoose Inspect
        4. This opens DevTools for the side panelThis opens DevTools for the side panel
        5. Debug Content Script:Debug Content Script:

          1. Open DevTools with F12 on any webpageOpen DevTools with F12 on any webpage
          2. In the Console panel, click the execution context dropdown in the top-leftIn the Console panel, click the execution context dropdown in the top-left
          3. Select your extension nameSelect your extension name
          4. Then you can see console output from the Content ScriptThen you can see console output from the Content Script
          5. ๐Ÿ–ผ๏ธ placeholder: Screenshot of Chrome DevTools showing how to choose different execution contexts to debug different extension componentsplaceholder: Screenshot of Chrome DevTools showing how to choose different execution contexts to debug different extension components

            ๐Ÿ–ผ๏ธ placeholder: Screenshot of Chrome DevTools showing how to choose different execution contexts to debug different extension componentsplaceholder: Screenshot of Chrome DevTools showing how to choose different execution contexts to debug different extension components

            5.2 Common Troubleshooting5.2 Common Troubleshooting

            ProblemPossible CauseSolution
            Clicking the icon does nothingService Worker errorCheck the Service Worker DevTools Console
            Cannot get page contentContent Script not injectedRefresh the page and try again, check matches config in manifest
            API call failsAPI Key is wrong or expiredRe-enter the API Key in the settings page
            Side panel is blanksidepanel.html path is wrongCheck side_panel.default_path in manifest

            If you want to share the extension with others, you can publish it to the Chrome Web Store.If you want to share the extension with others, you can publish it to the Chrome Web Store.

            6.1 Prepare for Publishing6.1 Prepare for Publishing

            1. Register a developer account: visit [Chrome Web Store Developer Dashboard](https://chrome.google.com/webstore/devconsole) and pay the one-time $5 registration feeRegister a developer account: visit [Chrome Web Store Developer Dashboard](https://chrome.google.com/webstore/devconsole) and pay the one-time $5 registration fee
            2. Enable 2-Step Verification: your Google account must enable 2-Step Verification before publishingEnable 2-Step Verification: your Google account must enable 2-Step Verification before publishing
            3. Prepare assets:Prepare assets:
            4. Extension icon: 128x128 PNGExtension icon: 128x128 PNG
            5. At least one screenshot: 1280x800 recommendedAt least one screenshot: 1280x800 recommended
            6. Detailed functional descriptionDetailed functional description
            7. Privacy policy explanation (if your extension processes user data)Privacy policy explanation (if your extension processes user data)
            8. 6.2 Package and Upload6.2 Package and Upload

              1. Compress the extension folder as a .zip file (not .crx)Compress the extension folder as a .zip file (not .crx)
              2. Click New Item in Developer DashboardClick New Item in Developer Dashboard
              3. Upload the .zip fileUpload the .zip file
              4. Fill in store information (name, description, screenshots, category, etc.)Fill in store information (name, description, screenshots, category, etc.)
              5. Fill in privacy practices (declare what user data your extension collects)Fill in privacy practices (declare what user data your extension collects)
              6. Click Submit for ReviewClick Submit for Review
              7. Google will review submitted extensions, which usually takes several business days. The fewer permissions you request and the clearer your description is, the faster the review usually goes.Google will review submitted extensions, which usually takes several business days. The fewer permissions you request and the clearer your description is, the faster the review usually goes.

                ๐Ÿ–ผ๏ธ placeholder: Screenshot of Chrome Web Store Developer Dashboard showing extension upload and metadata formplaceholder: Screenshot of Chrome Web Store Developer Dashboard showing extension upload and metadata form

                ๐Ÿ–ผ๏ธ placeholder: Screenshot of Chrome Web Store Developer Dashboard showing extension upload and metadata form p2placeholder: Screenshot of Chrome Web Store Developer Dashboard showing extension upload and metadata form p2

                ๐Ÿ–ผ๏ธ placeholder: Screenshot of Chrome Web Store Developer Dashboard showing extension upload and metadata formplaceholder: Screenshot of Chrome Web Store Developer Dashboard showing extension upload and metadata form

                Congratulations! You have built an AI-driven browser extension from scratch. Let us review what we did:Congratulations! You have built an AI-driven browser extension from scratch. Let us review what we did:

                1. Understood the Manifest V3 architecture of Chrome extensionsUnderstood the Manifest V3 architecture of Chrome extensions
                2. Used Content Script to read webpage contentUsed Content Script to read webpage content
                3. Used Service Worker to call AI APIs and generate summariesUsed Service Worker to call AI APIs and generate summaries
                4. Used Side Panel to display the summary resultUsed Side Panel to display the summary result
                5. Also learned how to use Chrome built-in AI without any API KeyAlso learned how to use Chrome built-in AI without any API Key
                6. Browser extension development is a very interesting field - it lets you "enhance" any webpage on the internet. Besides summarizing pages, you can build many more things with a similar architecture:Browser extension development is a very interesting field - it lets you "enhance" any webpage on the internet. Besides summarizing pages, you can build many more things with a similar architecture:

                  Advanced directions:Advanced directions:

                  • Translation assistant: translate foreign webpages into Chinese in one clickTranslation assistant: translate foreign webpages into Chinese in one click
                  • Reading annotations: highlight and annotate pages, then save to the cloudReading annotations: highlight and annotate pages, then save to the cloud
                  • Price tracking: monitor price changes on e-commerce pages and notify usersPrice tracking: monitor price changes on e-commerce pages and notify users
                  • Code explainer: select code on GitHub and let AI explain it automaticallyCode explainer: select code on GitHub and let AI explain it automatically

                  The arrival of Chrome built-in AI lowers the barrier even further - you do not even need an API Key to build AI-powered extensions. As browser AI capabilities continue to grow, the imagination space in this field will only get larger.The arrival of Chrome built-in AI lowers the barrier even further - you do not even need an API Key to build AI-powered extensions. As browser AI capabilities continue to grow, the imagination space in this field will only get larger.

                  Go give your browser some superpowers!Go give your browser some superpowers!

                  • [Chrome Extension Official Docs - Manifest V3](https://developer.chrome.com/docs/extensions/develop/)[Chrome Extension Official Docs - Manifest V3](https://developer.chrome.com/docs/extensions/develop/)
                  • [Publish Chrome Extension to Chrome Web Store](https://developer.chrome.com/docs/webstore/publish?hl=zh-cn)[Publish Chrome Extension to Chrome Web Store](https://developer.chrome.com/docs/webstore/publish?hl=zh-cn)
                  • [Chrome Side Panel API](https://developer.chrome.com/docs/extensions/reference/api/sidePanel)[Chrome Side Panel API](https://developer.chrome.com/docs/extensions/reference/api/sidePanel)
                  • [Chrome Built-in AI - Summarizer API](https://developer.chrome.com/docs/ai/summarizer-api)[Chrome Built-in AI - Summarizer API](https://developer.chrome.com/docs/ai/summarizer-api)
                  • [Chrome Built-in AI - Prompt API](https://developer.chrome.com/docs/ai/prompt-api)[Chrome Built-in AI - Prompt API](https://developer.chrome.com/docs/ai/prompt-api)
                  • [OpenAI API Docs](https://platform.openai.com/docs/api-reference)[OpenAI API Docs](https://platform.openai.com/docs/api-reference)
                  • [Anthropic Claude API Docs](https://docs.anthropic.com/en/docs/)[Anthropic Claude API Docs](https://docs.anthropic.com/en/docs/)
                  • [Anthropic Claude API Docs](https://developer.chrome.com/docs/webstore/publish?hl=zh-cn)[Anthropic Claude API Docs](https://developer.chrome.com/docs/webstore/publish?hl=zh-cn)