问题描述
我希望每次在扩展文件夹中保存文件时,我的 chrome 扩展都会重新加载,而无需在 chrome://extensions/中明确单击重新加载".这可能吗?
I'd like for my chrome extension to reload every time I save a file in the extension folder, without having to explicitly click "reload" in chrome://extensions/. Is this possible?
我知道我可以更新 Chrome 重新加载扩展程序的间隔,这是一个半途而废的解决方案,但我宁愿让我的编辑器(emacs 或 textmate)触发保存重新加载或要求 Chrome 监视目录的更改.
I'm aware I can update the interval at which Chrome reloads extensions, which is a half-way solution, but I'd rather either making my editor (emacs or textmate) trigger on-save a reload or asking Chrome to monitor the directory for changes.
推荐答案
您可以使用 "适用于 Chrome 的扩展程序重新加载器":
You can use "Extensions Reloader" for Chrome:
使用扩展的工具栏按钮或浏览到http://reload.extensions"重新加载所有解压的扩展
如果您曾经开发过 Chrome 扩展程序,您可能想要自动重新加载解压扩展的过程,而无需需要通过扩展页面.
If you've ever developed a Chrome extension, you might have wanted to automate the process of reloading your unpacked extension without the need of going through the extensions page.
Extensions Reloader"允许你重新加载所有解压的扩展使用两种方式:
"Extensions Reloader" allows you to reload all unpacked extensions using 2 ways:
1 - 扩展程序的工具栏按钮.
1 - The extension's toolbar button.
2 - 浏览到http://reload.extensions".
工具栏图标将通过单击重新加载解压的扩展.
The toolbar icon will reload unpacked extensions using a single click.
通过浏览重新加载"旨在自动化重新加载过程使用后构建"脚本 - 只需添加一个浏览到"http://reload.extensions" 将 Chrome 用于您的脚本,您将刷新 Chrome 窗口.
The "reload by browsing" is intended for automating the reload process using "post build" scripts - just add a browse to "http://reload.extensions" using Chrome to your script, and you'll have a refreshed Chrome window.
更新:自 2015 年 1 月 14 日起,该扩展程序已开源并且可在GitHub.
Update: As of January 14, 2015, the extension is open-sourced and available on GitHub.
这篇关于如何自动重新加载我正在开发的 Chrome 扩展程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!