chrome扩展程序
We all like surfing the web. And we all like things to be at the touch of our fingertips. Why not create something that caters to these two absolute truths?
我们都喜欢上网。 而且我们都希望事情触手可及。 为什么不创造出满足这两个绝对真理的东西呢?
In this article, I’ll explain the building blocks of a Chrome extension. Afterwards, you’ll just have to think of a good idea as an excuse to make one.
在本文中,我将介绍Chrome扩展程序的基本组成部分。 之后,您只需要将一个好主意视为创造一个主意的借口。
为什么选择Chrome? (Why Chrome?)
Chrome is by far the most popular web browser. Some estimations are as high as 59%. So, if you want to reach as many people as you can, developing a Chrome extension is the best way to do it.
Chrome是迄今为止最受欢迎的网络浏览器。 一些估计高达59% 。 因此,如果您想吸引尽可能多的人,开发Chrome扩展程序就是最好的方法。
⚠️ To be able to publish a Chrome extension, you need to have a developer account which entails a $5 one-time signup fee.
⚠️要发布Chrome扩展程序,您需要拥有一个开发人员帐户,该帐户需要支付5美元的一次性注册费 。
Each Chrome extension should have these components: the manifest file, popup.html and popup.js and a background script. Lets take a look at them.
每个Chrome扩展程序应具有以下组件: 清单文件 , popup.html和popup.js以及后台脚本。 让我们看看它们。
Chrome扩展程序由什么组成? (What makes up a Chrome extension?)
清单文件 (The Manifest File)
What is a manifest file? It is a text file in JSON (JavaScript Object Notation) format that contains certain details about the extension you will be developing.
什么是清单文件? 这是JSON(