I start learning the chrome extension, and ChatGPT suggests the following steps
I will use a visual studio code.
Ok, I want to display my name
It is a JSON file that provides important information about the extension to the browser, such as its name, version, and permissions.
I have created a JSON file with all elements
{
"manifest_version": 3,
"name": "Show My Name",
"description": "This chrome extension show my name",
"version": "1.0",
"action": {
"default_popup": "popup.html",
"default_icon": "icon.png"
}
}
This is the HTML code for the extension. the filename is a popup.html
<!-- popup.html -->
<html>
<head>
<style>
/* Add your CSS styles here */
</style>
</head>
<body>
<h1>Show My Name</h1>
<script src="popup.js"></script>
</body>
</html>
and linking popup.js file (if required)
// popup.js
document.addEventListener("DOMContentLoaded", function() {
// Add your JavaScript code here
});
Here are the six steps to test the extension
Once you’re happy with your extension, you can package it into a .crx file that can be uploaded to the Chrome Web Store or installed manually.
You can either publish your extension on the Chrome Web Store or share it with others through other means, such as distributing the .crx file directly.