惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

博客园 - 我有我奥妙

【BenchmarkDotNet】测试多方式的对象映射 【自动注入】.NET8/.NETCore 依赖注入:自动注入项目中所有接口和自定义类 【排名】处理同分数的排名 【Quartz】.Net8使用定时任务 【模型验证】未被异常捕获到 【Ant Design Vue】相关 【根节点】C#找树形数据的根节点Id 【C#】枚举值 【ECharts】图表自定义显示标题 【消息队列】介绍 【Nginx】Windows部署Vue 设计模式(一)-介绍 【.NetCore】创建本机的静态文件服务器 NLog(一)-使用示例 【nssm】windows上netcore注册为服务 【字符串排序】C#和前端js排序问题 【长路经】C#读取文件抛出FileNotFoundException异常 【RestSharp】常用的几个请求方式 【笔记软件】Obsidian的使用
【浏览器扩展】编写Firefox和Chrome的扩展程序
我有我奥妙 · 2024-01-19 · via 博客园 - 我有我奥妙

官方文档

Firefox

(1)文档
https://developer.mozilla.org/zh-CN/docs/Mozilla/Add-ons/WebExtensions
(2)文档示例代码
https://github.com/mdn/webextensions-examples

Chrome

(1)文档
https://developer.chrome.com/docs/extensions
(2)文档示例代码
https://github.com/GoogleChrome/chrome-extensions-samples

注意点

1、自己编写过程中,遇到了manifest_version的版本问题
网上大部分搜到的是manifest_version=2的代码
而manifest_version=3的代码好像没它多,而这2者是有些区别的
chrome参见:https://developer.chrome.com/docs/extensions/develop/migrate/known-issues

关于使用和发布问题

Firefox

(1)目前是可以调试,也就是临时加载附加组件,关闭浏览器后就消失。
(2)如果直接将压缩包加载到附加组件,就一直提示压缩包损坏,无法添加,应该是签名之类的校验吧。
(3)想永久用,就得注册Add账号,然后上架,上架需要压缩包,然后填写申请,等待审核,有个流程,有些麻烦。

Chrome

(1)目前是编写好就可以直接在浏览器的开发者模式中,加载已解压的扩展程序即可。
(2)加载后,可以开启控制台做调试,也可以永久使用,关闭浏览器后再次运行扩展也是在的。
(3)也没有签名之类的问题了,所以可以打压缩包,自由分发给其他人使用。