当前位置:网站首页>How to use Google plug-ins to inject code into websites
How to use Google plug-ins to inject code into websites
2022-06-09 15:33:00 【Zishu】
When browsing the website , Limited by the defects of the website , We usually write some scripts and plug-ins to extend , There are two conventional methods: Oil monkey and Google plug-in , Oil monkey is also a kind of plug-in , It's easy to use , Today we are going to talk about how to inject through Google plug-ins .
Generate the following files according to the structure
|chrome-plugin
|---manifest.json
|---script.js
|---favicon.ico stay manifest.json Write code in , This is an entry file , Declare the basic information of the plug-in .
default_iconIs the icon of the plug-inmatchesIs the website used , The website under this domain name will take effect . Be careful to add/*jsIs an imported file
// manifest.json
{
"name": "Welcome",
"manifest_version": 2,
"version": "1.0",
"description": " Extension plug-in ",
"browser_action": {
"default_icon": "favicon.ico"
},
"content_scripts": [
{
"matches": ["https://github.com/*"],
"js": [script.js"]
}
]
} And then in script.js Just insert a random piece of code into the .
// script.js
console.log('hello, world!') Such a basic plug-in constitutes , The next step is to upload . But if you are packing and generating crx After the document , Upload crx The document will report an error , Show danger , Because I didn't go to Google store . So we don't have to pack , Load local files directly .
Then select the written folder
Click OK to upload , Such a plug-in upload step is completed . We can learn related technologies , Write down some functions you need , This is also Chrome One of the reasons why browsers are so popular , It integrates a large number of plug-ins .
If you want to upload to the store for sale or share for free , You need to register a developer account . Pay 5 After the USD fee, you can upload , After review, you can see your plug-ins in the store list .
边栏推荐
猜你喜欢

From outsourcing to self research and then to large factories, who knows how I came here in the past five years

Huawei announced its top ten inventions: efficient additive network and multi-objective game intelligent driving

Mysql+C# EF6间的连接

细说腾讯如何做到直播延时降低90%以上方案

Mh2103act6 domestic software and hardware compatible alternative to stm32f103cbt6

华为哈勃将再添IPO,美芯晟蛰伏十余年后冲刺科创板
![[paper] cascade r-cnn: delving into high quality object detection](/img/7d/f5ebd89cd8963fe45d4894077ca25b.png)
[paper] cascade r-cnn: delving into high quality object detection

MH2103ACCT6国产软硬件兼容替代STM32F103CBT6

QT MSVC compiler Chinese problem solving, Chinese garbled and unable to compile normally

我把自动化测试学完后,一个月拿了2w+,才知道自动化测试这么吃香
随机推荐
Data visualization platform based on template configuration
pixi.js 碰撞检测
3ds max 错误提示1603,vc2005安装失败,错误排查
Global backbone network was interrupted for 4 hours: Google cloud, AWS, azure, etc. were affected
公司新来的阿里P6被辞退了,因为写测试用例不规范,躺平的悲哀?
@Enablefeignclients annotation source code analysis
js序获取两地距离
数组去重
细说腾讯如何做到直播延时降低90%以上方案
China UnionPay (Cloud Computing) fixed-point services: lingqueyun, daocloud, Youyun and Boyun won the bid (Development); Shenzhou information, Tencent cloud and Xinhua three standards (transportation
[v. reverse proxy and related configurations]
有关 cdn.jsdelivr.net 证书错误的一些想法
[Typecho blog Xiaobai building tutorial] you are only one step away from having your own blog
Connection between mysql+c ef6
Google搜索为什么不能无限分页?
mongoose连接多个数据库简单例子
JS implements the method of copying contents to the clipboard
淘宝小程序 2048游戏
【二、虚拟主机和域名解析】
一个优雅的字体压缩解决方案 ---fonttools