开发一个自己的chrom插件

开发一个自己的chrom插件

一、创建一个文件夹

二、配置文件manifest.json

  • 创建名字为:manifest.json的配置文件,模板如下:
json 复制代码
{
  "manifest_version": 3,
  "name": "Hello World Extension",
  "version": "1.0",
  "description": "Outputs 'Hello World' to the console on a specified website",
  "permissions": [
    "activeTab"
  ],
  "content_scripts": [
    {
      "matches": ["https://www.bilibili.com/*"],
      "js": ["content.js"]
    }
  ],
  "icons": {
    "16": "img.png",
    "48": "img.png",
    "128": "img.png"
  }
}

三、JS文件

js 复制代码
// content.js
console.log("Hello World");

四、目录结构

五、使用教程




相关推荐
天若有情673几秒前
ES6 模块与 CommonJS 的区别详解
前端·javascript·es6
大猫会长3 分钟前
postgreSQL中,RLS的using与with check
开发语言·前端·javascript
win x4 分钟前
文件操作与io总结
java
摘星编程12 分钟前
React Native for OpenHarmony 实战:ProgressBar 进度条详解
javascript·react native·react.js
wusp199422 分钟前
nuxt3模块化API架构
前端·javascript·nuxt3
洛豳枭薰23 分钟前
jvm运行时数据区& Java 内存模型
java·开发语言·jvm
这儿有个昵称28 分钟前
互联网大厂Java面试场景:从Spring Boot到微服务架构
java·spring boot·消息队列·微服务架构·大厂面试·数据库优化
摘星编程30 分钟前
React Native for OpenHarmony 实战:SegmentControl 分段控件详解
javascript·react native·react.js
摘星编程35 分钟前
React Native for OpenHarmony 实战:ProgressRing 环形进度详解
javascript·react native·react.js
TAEHENGV1 小时前
React Native for OpenHarmony 实战:数学练习实现
javascript·react native·react.js