0
当然,这个问题太疯狂了,但我找不到任何解决方案。不能使用任何Chrome API来收听活动
详细的我的代码:
manifest.json的
"content_scripts": [{
"js": [ "ct.js" ],
"matches": [ "<all_urls>" ]
}],
"permissions": [ "management","storage","proxy", "*://*/*" ],
ct.js
chrome.management.onInstalled.addListener(function (info) {
console.info(info);
});
chrome.management.onEnabled.addListener(function (info) {
console.info(info);
});
我在控制台
ct.js:58 Uncaught TypeError: Cannot read property 'onInstalled' of undefined
得到一个错误的结果
我登录chrome
变量在控制台
{
app: Object
csi: function()
loadTimes: function()
runtime: Object
webstore: Object
__proto__: Object
}
我2天前卡住。对我来说任何援助对我的生活都是巨大的帮助。
对不起,我的英语不好。感谢收看。