Chrome浏览器插件开发(一)
参考官网例子,巨详细
新建文件 manifest.json
{
"manifest_version": 3,
"name": "Hello Extensions",
"description": "Base Level Extension",
"version": "1.0",
"action": {
"default_popup": "hello.html",
"default_icon": "hello_extensions.png"
}
}
新建hello.html,代码如下
<html>
<body>
<h1>Hello Extensions</h1>
<script src="popup.js"></script>
</body>
</html>
新建popup.js文件,代码如下
console.log("This is a popup!")