繁体   English   中英

尝试使用 Chrome API topSites

[英]Trying to use Chrome API topSites

我目前正在尝试使用 Chrome API topSites 获取最常访问的网站列表。 在我的背景页面中使用下面的代码到目前为止我没有运气,错误代码Cannot read property 'get' of undefined 作为参考,我已经在manifest.json列出了权限下的 API。

background.js

chrome.topSites.get((arr) => {
  console.log(arr);
});

找到了我的问题的解决方案,我没有更新扩展包以使用 chrome API topSites。 我不得不按下load unpacked和更新。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM