如何从Chrome网上应用店修改扩展程序? [英] How to modify an extension from the Chrome Web Store?
问题描述
我在Chrome网上应用店看到了此扩展程序,它显示YouTube频道的最新视频。我希望修改此扩展程序,以便使其可以用于其他渠道。
如何完成此操作?
您有两个选择: 联系扩展的开发人员,
我将解释如何修改扩展名并安装它, 。
获取源代码并修改它
- 安装 Chrome扩展源查看器。
- 转到您要修改的扩展程序的Chrome网上应用店页面。
- 点击黄色CRX按钮,然后选择下载(截图)。
- 解压zip文件。 阅读源代码并更改什么需要改变(在你的特定情况下,我很快就发现你想改变编辑
config.js
并改变channel
属性)。保存更改。
使用扩展名的修改版本。
- 访问Chrome扩展程序页面(
chrome:// extensions /
)。
- 通过在右上角的复选框中勾选启用开发者模式。
- 点击加载解压扩展名按钮。
- 选择你的扩展的文件夹(要知道哪个文件夹是正确的,检查文件夹是否包含一个名为
manifest.json
的文件。) - 确认。您完成了。
除非您在这些步骤(包括修改源代码)中犯了错误,修改后的扩展应该按预期工作。
道德规范
修改个人使用的扩展程序并不是什么大问题。但是,未经原始开发者同意,不分发此扩展程序。原作者在创建扩展时做了很多努力,甚至可能会有他/她的联系方式。如果您发布扩展的(修改后的)副本,原作者无法再更新扩展,所以他/她无法解决错误。
更糟糕的是,如果您将扩展转换成不良形状,用户会向原作者投诉,因为他们的联系信息已经存在。
I've seen this extension in the Chrome Web store, which shows the newest videos of a YouTube channel. I want to modify this extension in order to make it work with a different channel.
How can I get this done?
You've got two options:
- Contact the extension's developer, and ask for assistance.
- Edit the source code
I'm going to explain how you can modify an extension, and install it, in easy terms.
Getting the source and modifying it
- Install the Chrome extension source viewer.
- Go to the page in the Chrome Web Store of the extension you want to modify.
- Click on the yellow CRX button, and choose Download (screenshot).
- Extract the zip file.
- Read the source code, and change what needs to be changed (in your particular case, I had quickly identified that you wanted to change edit
config.js
and change the"channel"
property). Save the changes.
Using the modified version of the extension.
- Visit the Chrome extension page (
chrome://extensions/
). - Enable Developer mode, by putting a check on the checkbox in the upper-right corner.
- Click on the "Load unpacked extension" button.
- Select the folder of your extension (to know which folder is correct, check whether the folder contains a file called
manifest.json
). - Confirm. You're done.
Unless you've made a mistake in either of these steps (including the modification of the source code), the modified extension should work as intended.
Ethics
Modifying someone else's extension for personal use is not a big deal. However, do not distribute this extension without the original developer's consent. The original author has put lots of efforts in creating the extension, and might even have his/her contact details on it. If you distribute a (modified) copy of the extension, the original author cannot update the extension any more, so s/he cannot resolve bugs.
Even worse, if you turn the extension in a bad shape, users will complain to the original author, because their contact details are on it.
这篇关于如何从Chrome网上应用店修改扩展程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!