By the end of this lesson you will know the parts of a Chrome extension, what it can and cannot do, and the one small tool you will build in this course.
You need: Chrome on a laptop or desktop (extensions do not run in Chrome on phones) · Time: 7 minutes
A Chrome extension is a small program you add to Chrome. It gets a button in the toolbar, and it can work with the pages you open. You already know some: Google Translate, password managers, ad blockers, grammar checkers.
An extension is made of normal web files: HTML (the structure), CSS (the look) and JavaScript (the behaviour). The same three things a website uses. That is why it is a great second project after a web page: small, useful from day one, and no server to pay for.
You will not write the code by hand. Your coding agent writes it; you write clear prompts, load the result in Chrome, click around and decide what to fix.
Why?Many people repeat the same browser task every day: copying job links into a notes app, checking the same words on every page. An extension turns that into one click, and you can build it in an afternoon.
It can:
- Show a small window (a popup) when you click its toolbar icon.
- Read and change the page you are looking at, when you allow it: mark words, add a button, hide an ad.
- Remember things, like a list of saved jobs, even after you close Chrome.
- React to events in the background, like a timer or a right-click menu item.
It cannot:
- Run in the Chrome app on your Android phone or iPhone. Chrome on phones does not support extensions today, so you build and use it on a laptop or desktop.
- Touch Chrome's own pages (addresses that start with
chrome://) or the Chrome Web Store pages. Chrome blocks that on purpose. - Read your files or other apps on the computer. It lives inside the browser only.
- Load new code from the internet after you install it. The current rules, Manifest V3, say all the code must be inside the extension. More on that in lesson 3.
Why?Knowing the limits early saves you from planning something Chrome will never allow. If an idea needs your phone or your files, an extension is the wrong tool.
Every extension is one folder. Inside it are a few parts, each with one job. Manifest V3 is the current version of Chrome's extension rules; every new extension uses it.
One folder, a few parts. The popup and the content script both read and write the same storage. - manifest.json: a short text file that tells Chrome the name, version, which files to use and which permissions (things the extension asks Chrome to allow) it needs.
- Popup: the small window you see when you click the icon. It is a tiny web page:
popup.html,popup.css,popup.js. - Content script: JavaScript that runs inside a web page, so it can read and change that page.
- Service worker: a background script for events, like alarms or menu clicks. Our extension does not need one.
- chrome.storage: the extension's own notebook. Data stays after Chrome restarts, and is removed if the extension is removed.
- Icons: PNG pictures at 16, 48 and 128 pixels.
Match them Match each part with its job in Job Hunt Helper
Tap an item on the left, then its meaning on the right.
Why?When something breaks, you will need to tell your agent which part broke. "The popup does not show the list" is a bug the AI can fix; "the extension doesn't work" is not.
Through this course you build one extension, Job Hunt Helper:
- Save job: on any job page (Naukri, LinkedIn, Internshala…), click the icon, type a note like "₹4.5 LPA, apply by 30 Nov", press Save. The title, link, note and date go into a list.
- Highlight: one click marks your keywords on the page in yellow:
remote,fresher,work from home,LPA,₹, your city.
It is useful for a student hunting a first job, for a freelancer tracking gigs, and for anyone comparing many listings. Later you can change the idea: a tuition teacher could save study links with notes, an office worker could save supplier pages with prices. The parts stay the same.
Before any code, ask your agent to explain the plan. This prompt changes nothing on your computer:
Prompt · copy it into your AI agentI want to build a Chrome extension called "Job Hunt Helper" with plain HTML, CSS and JavaScript (Manifest V3). It should: 1. Save the job page I am on (title, URL and my note) to a list I can open from the toolbar. 2. Highlight my keywords like "remote", "fresher" and "LPA" on that page when I click a button. Do not write any code yet. In simple words, tell me: - which parts it needs (manifest, popup, content script, service worker, storage) and what each one does here, - the smallest set of permissions it needs and what warning, if any, Chrome will show users, - anything Chrome extensions cannot do that I should know before starting. Keep the answer under 200 words.
Why?Asking for the plan first (you saw this in plan first, build small) shows you whether the AI understood, before it creates ten files you then have to undo.
An extension with wide permissions can see everything on the pages you open: your email, your bank page, your college portal. That is why Chrome shows a warning when you install one. Ask for the fewest permissions your extension needs, and be picky about the ones you install.
Rules for your own Chrome:
- Install only from the Chrome Web Store, from developers you can identify, with real reviews.
- Never install an extension a stranger sends you as a zip file or a link on WhatsApp.
- Remove extensions you no longer use. Even good extensions can turn bad after an update or after being sold (The Great Suspender in 2021 and the Cyberhaven extension in December 2024 are well-known cases).
Do it now Clean up your own Chrome now (2 minutes)
Why?The same rule applies to what you build: users will see the permissions you ask for. An extension that asks for little gets installed more, and gets through the store review faster.
- An extension is a small app inside Chrome, made of HTML, CSS and JavaScript.
- It can add a popup, read and change pages you allow, and remember data. It cannot run on phone Chrome, touch
chrome://pages, or load code from the internet. - Parts: manifest.json, popup, content script, optional service worker, chrome.storage, icons.
- Fewer permissions means more trust, for your users and for you.
- Next: build the popup and save jobs.
Create a free account to save your progress and open every lesson. Create free account