OMNI 浏览器插件
type
status
date
slug
summary
tags
category
icon
password
😀
这里写文章的前言: 一个简单的开头,简述这篇文章讨论的问题、目标、人物、背景是什么?并简述你给出的答案。
可以说说你的故事:阻碍、努力、结果成果,意外与转折。
 
 
 
 
 

manifest.json

快捷键事件

在后台可以使用使用chrome.commands.onCommand.addListener 监听“open-omni”事件

content_scripts

设置将那些js和css注入到哪些页面tab
tips: 刚刚安装没有这个注入, 需要使用chrome.runtime.onInstalled.addListener事件监听,然后手动获取当前的mianfiest注入到需要的tab
https://developer.mozilla.org/zh-CN/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts
 

通信

 

获取当前插件url

chrome.runtime.getURL
 

监听图标点击事件

chrome.action.onClicked.addListener
 

css prefers-color-scheme

 

各种对 bookmark tab history 等操作的api

 
 

CSS中获取插件的本地字段

chrome-extension://__MSG_@@extension_id__/
 

© ittat 2016-2025