What Is a Browser Extension: If You Can Build Web Pages, You Can Build Extensions
💡 One-sentence summary: A browser extension is a mini program that runs inside Chrome—you can build it with the same HTML/CSS/JS used for web pages, and it can modify the interface, modify web pages, and intercept requests; on the developer side, AI writes the code, and you handle the ideas and acceptance.
Search for "browser extension development" and the top tutorials throw manifest_version, MV3, service worker, and content script at you in the first screen—beginners quit after two paragraphs. This lesson writes no code; it first makes the most important things clear: what a browser extension actually is, what it can do, why "if you can build web pages, you can build extensions," and what hurdles stand between an idea and the store.
This is Lesson 1 of the Scenario Hands-On C track (building browser extensions), and it is the foundation of the entire track—every operation in the following six lessons builds on the concepts from this lesson.
- Haven't picked a track yet? Go back to 4.0 Scenario Hands-On: Choose Your Track
- What you actually want to build is "a website with a public URL"? See A1 Building Websites with AI
- Want to build a service that "spreads within WeChat"? See B1 What Is a WeChat Mini Program
What You'll Be Able to Do After This Lesson
- Explain "what a browser extension is" using Chrome's official definition: customizing the interface, listening to browser events, modifying web pages
- List the five core capabilities of extensions: toolbar popups, sidebars, intercepting network requests, injecting scripts into web pages, and listening to events in the background
- Explain clearly why "if you can build web pages, you can build extensions": the tech stack is just HTML/CSS/JS plus a manifest.json
- Remember the three bottom lines for publishing to the Chrome Web Store: single purpose, policy compliance, all code bundled
- Draw the map of the C track's seven lessons and know which lesson covers each concept
Where You Are Now
- "Translation, screenshots, ad blocking... how are these extensions I use every day actually made?"
- "I searched for Chrome extension development, and the first screen of tutorials is manifest, MV3, service worker—I don't recognize a single word"
- "I can have AI build web pages, but extensions feel like a different world—is AI reliable for writing extensions?"
When to Use This Approach
When you need to:
- Modify the browser itself: add buttons on any web page, block elements, change styles, grab content
- A tool that lives permanently in the browser—click the toolbar icon to use it, without first opening some website
- Build productivity tools where "you are the first user": text-selection translation, tab management, auto form filling
And you don't want to:
- Learn a new language—extensions use the same HTML/CSS/JS as web pages
- Set up a project from scratch—an extension at its smallest is just a folder with a few files
- Deal with servers—extensions run in the browser, load locally, and need no deployment
What you build would rather be "accessible to anyone via a URL"? That's the A track's business—go back to A1 Building Websites with AI.
🎒 Preparation Before Starting
- Have completed 4.0 Scenario Hands-On: Choose Your Track and confirmed that what you want is "a tool inside the browser"
- Chrome browser installed on your computer (the C track is based on Chrome; this lesson is read-only, no hands-on)
- 8 minutes of reading time; this lesson requires no code at all
Core Idea
First, let's align on the name: what the official documentation calls Chrome extensions is habitually called "browser extensions" or "Chrome extensions" in the Chinese community; this course uses both names interchangeably.
Chrome's official documentation gives extensions a one-sentence definition:
Chrome extensions enhance the browsing experience by customizing the user interface, observing browser events, and modifying the web. (Chrome extensions enhance the browsing experience by customizing the interface, listening to browser events, and modifying web pages.)
Translated into plain language: an extension is a mini program that "the browser officially allows to modify the browser," and it does three things:
| # | In the official definition | In plain language |
|---|---|---|
| 1 | customizing the user interface | Add your own interface to the browser (buttons, popups, sidebars) |
| 2 | observing browser events | Listen to the browser's every move (opening tabs, closing tabs, deleting bookmarks) |
| 3 | modifying the web | Modify the web page you're viewing (add elements, change styles, intercept requests) |
For beginners, the most crucial sentence from the official documentation is:
You can build extensions using the same web technologies that are used to create web applications: HTML, CSS, and JavaScript. (You can build extensions using the same technologies as web pages: HTML, CSS, and JavaScript.)
This is where this lesson's title comes from—if you can build web pages, you can build extensions. You can already have AI write the web trio; an extension just adds a manifest.json"specification" file that tells Chrome what your extension is called and which permissions it needs.
💡 Why AI is reliable for writing extensions
All of an extension's code is HTML/CSS/JS plus one JSON configuration—no compilation, no framework barrier. Chrome's official documentation is systematic, covering everything from getting started, manifest, and debugging to publishing. Every fact in the C track's lessons comes from this documentation; just feed it to AI.
Follow Along
Step 1: Take stock of the extensions you use every day (getting started begins with "having used one")
Why: Be a user first, then a developer. One look at what a "finished product" looks like beats memorizing ten terms.
How: Open Chrome, type chrome://extensions in the address bar and press Enter (or click the puzzle button on the toolbar → Manage Extensions).
You should see: a list of installed extensions. Translation, screenshots, ad blocking… every extension you can name is, at its core, a mini program built from "a folder + manifest.json + HTML/CSS/JS".
- Quick check: pick an extension you use often and think about whether it "changes the interface," "listens for events," or "modifies web pages"
Step 2: Use the official capability list to answer "what can an extension do"
Why: when making requests to an AI, being able to say "I want a popup" or "I want to inject a script into the page" greatly increases the odds the AI gets it right the first time. This table is the extension's "parts catalog."
| Capability | Official description | Typical use |
|---|---|---|
| Toolbar button (Action) | Runs code when the toolbar icon is clicked, or opens a small window (popup) | One-click features: translation, screenshots, summarization |
| Side Panel | Displays a custom interface in the browser's side panel | Persistent dictionaries, notes, AI chat panels |
| Network request interception (DeclarativeNetRequest) | Intercepts, blocks, or modifies network requests | Ad filtering, blocking tracking scripts |
| Content scripts | Runs JavaScript in the web page's environment | Adding buttons to pages, changing styles, reading page content |
| Service workers | Runs in the background, handling browser events (such as bookmark deletion, tab closing) | Listening for tab changes, sending notifications |
Beyond these five categories, extensions can also use regular Web APIs and a full suite of Chrome extension APIs—the official documentation is the authority on capability boundaries.
You should see: when ideas like "translate selected text" or "block popups" come up, you can map them to the right slot—for example, translating selected text requires a content script to enter the web page; blocking ads relies on intercepting network requests.
Step 3: Understand the tech stack—why "if you can build web pages, you can build extensions"
Why: the tech stack determines the learning cost. If building extensions required learning a new language first, it shouldn't be in a zero-basics roadmap.
Good news: you've seen all of this in Track A.
| Technology | In web pages (Track A) | In extensions |
|---|---|---|
| HTML | Page structure | Page structure for popups, side panels, and settings pages |
| CSS | Page styling | Same syntax |
| JavaScript | Page logic | Same language, calling Chrome extension APIs as needed |
There's only one new thing: manifest.json—a JSON configuration file placed in the extension's root directory that tells Chrome the extension's name, version, and required permissions. It's the extension's "ID card + manual"; C3 breaks it down field by field.
And remember this one rule right now: when developing extensions, only write Manifest V3 (MV3). In the manifest, manifest_version only supports 3; many old tutorials online still use MV2, and copying them will waste your effort—MV2 extensions have been fully disabled by Chrome (starting with Chrome 138 in 2025 7, users on all channels can no longer enable them).
You should see: you now have a clear picture—no new language, just one new file and a few sets of APIs to look up as needed.
Step 4: Remember the three bottom lines for publishing browser extensions
Why: these three rules are where Chrome officially draws the line on "what extensions can be published." Knowing them before you start saves a whole round of rework; discovering them after you finish makes fixing things the most painful.
The official requirements for publishing an extension:
- Single purpose: an extension must have exactly one clearly defined, easy-to-understand purpose—a "does everything" toolbox won't pass review
- Comply with the developer program policies: there are rules for content, behavior, and privacy
- All code must be packaged: in the official's own words—"all logic must be included in the extension package. This means no additional JavaScript code may be downloaded at runtime."
Rule 3 matters especially for vibe coding: want your extension to "pull the latest logic from a server" to bypass updates? That path is closed—officially prohibited in plain text.
You should see: you now have an extra self-check when choosing a product—can I state my extension's single purpose in one sentence? Is all the code in the package?
Step 5: Draw the seven-lesson map of Track C
Why: once you remember the map, the remaining six lessons are just fill-in-the-blanks—each lesson fills one slot.
Track C has seven lessons in total; this lesson (C1) is the foundation, leaving six slots:
| Lesson | What it solves |
|---|---|
| C2 Your first Chrome extension | Get Hello World running in 15 minutes: a minimal manifest example + three steps to load locally |
| C3 manifest.json in depth | What each field means, and what else to fill in for publishing |
| C4 Content Scripts and Service Workers | What the extension's "hands" and "brain" each handle, and when to use which |
| C5 What to do when your extension won't load | Where to find logs, how to read errors |
| C6 Publishing to the Chrome Web Store | Developer registration, packaging a zip, and the full submission process |
| C7 Store review and release strategy | Reviews mostly complete within 3 days; staged rollout and rollback |
💡 Can developers in China register?
Yes. China (mainland China) is on the Chrome Web Store's list of supported countries and regions for registration. Registration requires a one-time fee; the exact amount is shown on the payment page in the developer dashboard—see C6 for details.
You should now see: a map of the seven lessons in your mind, with the next lesson being hands-on Hello World.
Checkpoint ✅
- Can recite the three things from the official definition: custom interfaces, listening to browser events, modifying web pages
- Can name three of the five capability categories: toolbar popup, side panel, intercepting requests, content scripts, background service
- Know that the extension tech stack is just HTML/CSS/JS + one manifest.json, with no new languages
- Can state the three bottom lines for publishing: single purpose, policy compliance, all code bundled (no remote-loaded JS allowed)
- Know that for now you only write MV3, and that old MV2 tutorials online must not be copied
Pitfall warnings
❌ Thinking extension development requires learning a whole new technology
As soon as you hear "development," you start grinding through books? No need. The official docs state clearly that extensions use HTML/CSS/JS; the only new things are one manifest.json and the Chrome APIs you look up as needed.
Correct approach: Bring the web experience you built on Path A straight over; look up whatever you're missing instead of learning from scratch.
❌ Copying MV2 code from old online tutorials
Many popular tutorials were written in the MV2 era. In the manifest today, manifest_version only supports 3, and MV2 extensions have been fully disabled by Chrome—copying old code amounts to wasted work.
Correct approach: If you see "manifest_version": 2 in a tutorial, close it immediately; treat the official docs and the C3 field quick reference as authoritative.
❌ Trying to build dynamic logic via "downloading code from a server at runtime"
The official rules state: all logic must be bundled into the extension package, and downloading extra JavaScript at runtime is not allowed. Extensions designed this way won't pass review.
Correct approach: Update features the proper way—modify the code, bump the version number, resubmit (the cadence is covered in C6/C7).
❌ Cramming every feature into a single extension
A Swiss-army-knife extension that "translates, takes screenshots, and manages tabs" violates the single-purpose requirement and can't explain its use clearly at publishing time.
Correct approach: One extension solves one problem. A second idea? Make a second extension.
Advanced tips (optional)
🚀 The official tutorial list is a ready-made advanced path. Chrome officially arranges a tutorial chain for beginners: Hello World → Run scripts on every page (automatically add elements to specified sites) → Inject scripts into the active tab (change the current page's style by clicking the toolbar icon) → Create a tab manager (tab management popup) → Handle events with service workers → Debug your extension. The later lessons of Path C follow this chain; after finishing the seven lessons, you'll be able to work through all the official tutorials.
If you write extensions with TypeScript, you can install the npm package chrome-types to get autocomplete for the Chrome APIs—this package updates automatically with the Chromium source code, so remember to upgrade it regularly.
Lesson summary
✅ In the first lesson of browser extension development, you received this map:
- Browser extension = a mini program the browser officially lets you use to transform it: custom interfaces, listening to browser events, modifying web pages
- The five-part capability set: toolbar popup (Action), side panel, intercepting requests (DeclarativeNetRequest), content scripts, background service
- Zero additions to the tech stack: HTML/CSS/JS + manifest.json; for now you only write MV3
- Three bottom lines for publishing: single purpose, policy compliance, all code bundled
- Path C's seven lessons: this lesson (foundation) → Hello World → manifest → the two scripts → debugging → publishing → review strategy
| Key concept | One-sentence memory hook | Which lesson covers it |
|---|---|---|
| manifest.json | The extension's ID card + instruction manual | C3 |
| MV3 | The only current version; don't copy old MV2 tutorials | C2 |
| content script / service worker | The extension's hands and brain | C4 |
| Local loading and debugging | chrome://extensions + log locations | C5 |
| Publishing and review | One-time registration fee, most reviews done within 3 days | C6 · C7 |
Next lesson preview
In the next lesson, C2 Your first Chrome extension: get Hello World running in 15 minutes. You will learn:
- What the minimal working manifest.json example looks like (the official example, verbatim)
- Turning on Developer mode in
chrome://extensionsand loading locally with Load unpacked in three steps - After changing code, which files require refreshing the extension and which don't
- How to pin the extension to the toolbar so it's ready whenever you click
When you're ready, head into C2 →