如果您在我的Chrome扩展程序的弹出窗口中按下按钮,我会尝试这样做,它会重新加载扩展程序。这可能吗?
答案 0 :(得分:1)
Just found this method, which does exactly what I want:
chrome.runtime.reload();
答案 1 :(得分:0)
将此代码添加到manifest.json:
"background": {
"persistent": false,
"scripts": [ "background.js" ]
}
将此代码添加到background.js:
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.runtime.reload();
});