Poznawanie struktury Manifest V3
Szczegółowo poznaj plik manifest.json, wymagane pola i typowe konfiguracje dla Manifest V3.
Poznawanie struktury Manifest V3 to bezpłatna lekcja Browser Extensions Development (Chrome & Edge) na CoddyKit. To lekcja 1 z 4. Możesz przeczytać całą lekcję poniżej za darmo — a potem ćwiczyć ją interaktywnie w przeglądarce z wbudowanym edytorem kodu i tutorem AI dostępnym 24/7. To część ścieżki edukacyjnej Browser Extensions Development (Chrome & Edge), a Twój postęp synchronizuje się między webem a aplikacją CoddyKit. Kurs Browser Extensions Development (Chrome & Edge) zawiera 4 lekcji w sumie.
Części tej lekcji nie zostały jeszcze przetłumaczone i są wyświetlane po angielsku.
The Blueprint of Your Extension
Every browser extension starts with a core configuration file called manifest.json. Think of it as the blueprint or identity card for your extension.
This file tells the browser everything it needs to know: its name, version, what permissions it needs, and which files make up its different parts.
Introducing Manifest V3
Manifest V3 is the latest version of the extension platform, bringing significant changes focused on security, privacy, and performance.
All new extensions must use Manifest V3, and existing extensions are migrating. Understanding its structure is crucial for modern extension development.
Required Field: manifest_version
The manifest_version field is mandatory and tells the browser which set of APIs and security features your extension expects.
- For Manifest V3, this value must always be
3. - It's the very first declaration in your
manifest.jsonfile.
Required Fields: name and version
These two fields are also essential for every extension:
name: This is the user-visible name of your extension. It appears in the browser's extension management page and in the web store.version: This specifies the version of your extension, typically following semantic versioning (e.g., "1.0.0"). It helps users track updates.
Your First Manifest File
Let's see the absolute minimum needed for a valid Manifest V3 file. This simple JSON structure is the foundation for any extension you build.
{
"manifest_version": 3,
"name": "My Basic Extension",
"version": "1.0"
}Optional Field: description
While not strictly required, adding a description is highly recommended. It provides a short summary of what your extension does.
This description is visible to users in the browser's extension management page and is crucial for your listing in the Chrome Web Store or Edge Add-ons store.
Optional Field: icons
The icons field allows you to define images that represent your extension. Browsers use different sizes for various UI contexts:
- Toolbar buttons (16x16, 24x24, 32x32 pixels)
- Extension management page (48x48 pixels)
- Web store listing (128x128 pixels)
Always provide a 128x128 icon for store listings.
Optional Field: action
The action field defines the behavior of your extension's toolbar button, often called the 'browser action' button. This is the icon next to the address bar.
It commonly points to an HTML file (a "popup") that appears when the button is clicked, allowing for quick user interaction with your extension's UI.
A More Detailed Manifest
Let's expand our manifest to include a description, icons, and an action popup. This gives your extension a clear identity and a basic interactive element.
{
"manifest_version": 3,
"name": "My Awesome Extension",
"version": "1.0",
"description": "A simple extension to do awesome things!",
"icons": {
"16": "icons/icon16.png",
"48": "icons/icon48.png",
"128": "icons/icon128.png"
},
"action": {
"default_popup": "popup.html",
"default_icon": {
"16": "icons/icon16.png",
"24": "icons/icon24.png",
"32": "icons/icon32.png"
},
"default_title": "Click to open!"
}
}Quick Check on Manifest Fields
Based on what you've learned, identify the fields that are absolutely required in a Manifest V3 manifest.json file.
Manifest V3: Your Extension's Identity
We've explored the fundamental role of the manifest.json file, understanding it as the blueprint for your browser extension.
- You learned about the three critical required fields:
manifest_version(always 3),name, andversion. - We also touched upon important optional fields like
description,icons, andaction, which define your extension's appearance and basic user interface.
Mastering the manifest file is the first step to building powerful and compliant browser extensions!
Często zadawane pytania
Czy lekcja „Poznawanie struktury Manifest V3” jest bezpłatna?
Tak — pełny tekst „Poznawanie struktury Manifest V3” jest dostępny za darmo tutaj w sieci. Aby ćwiczyć ją interaktywnie (wbudowany edytor kodu i tutor AI dostępny 24/7) i odblokować resztę kursu Browser Extensions Development (Chrome & Edge), przejdź na CoddyKit PRO. Kurs Browser Extensions Development (Chrome & Edge) zawiera 4 lekcji w sumie.
Co nauczysz się w „Poznawanie struktury Manifest V3”?
Szczegółowo poznaj plik manifest.json, wymagane pola i typowe konfiguracje dla Manifest V3. Ćwiczysz Browser Extensions Development (Chrome & Edge) z praktycznym kodem, który uruchamiasz bezpośrednio w przeglądarce, a tutor AI dostępny 24/7 odpowiada na Twoje pytania podczas pracy nad lekcją.
Czy potrzebuję doświadczenia, aby zacząć Browser Extensions Development (Chrome & Edge)?
Nie wymagamy żadnego doświadczenia. Browser Extensions Development (Chrome & Edge) w CoddyKit jest strukturyzowany dla początkujących i zaawansowanych użytkowników, więc możesz zacząć tutaj lub od początku i uczyć się w swoim tempie. To lekcja 1 z 4.
Ile czasu zajmuje lekcja „Poznawanie struktury Manifest V3”?
Większość lekcji CoddyKit trwa około 5–10 minut. Każda lekcja to mały, interaktywny krok, dzięki czemu robisz systematyczne postępy i zawsze wracasz dokładnie do tego samego miejsca — na webie i w aplikacji.
Czy mogę pisać i uruchamiać kod w tej lekcji Browser Extensions Development (Chrome & Edge)?
Tak. Każda lekcja Browser Extensions Development (Chrome & Edge) zawiera wbudowany edytor kodu, więc piszesz i uruchamiasz prawdziwy kod bezpośrednio w przeglądarce i od razu otrzymujesz sprzężenie zwrotne od AI — bez konfiguracji na komputerze.
Wszystkie lekcje w tym kursie
- Poznawanie struktury Manifest V3
- Background service workery
- Uprawnienia i dopasowywanie hostów
- Action, ikony i przycisk na pasku narzędzi