We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
前言:之前并没有接触过chrome扩展,第一次接触chrome插件也只是使用二维码生成器,然后是老大给了一篇教程之后开始尝试,然后觉得还是蛮好玩的,便尝试了一个demo,是对自己收藏的书签进行美化还有添加的一些操作
chrome
对于chrome开发入门的一些知识,直接看教程和这里即可,这里不赘述。
下面记录一些开发过程中踩过的坑以及解决方案:
manifest.json
default-icon
icons
"icons": { "48": "icon.png" },
chrome.storage.sync undefined?
这是因为在manifest.json文件中没有声明如下定义:
"permissions": [ "storage" ],
permissions
"permissions": [ "storage", "bookmarks" ],
“Not allowed to load local resource: chrome://favicon/”
查找错误原因,stackoverflow给出的讨论是需要在manifest.json中添加权限,讨论地址,按照讨论方案设置如下权限:
stackoverflow
"permissions": [ "storage", "bookmarks", "http://*/", "chrome://favicon/", "chrome://favicon/*", "tabs", "<all_urls>" ],
仍然不生效,还在继续查找原因
后面的一些经验和总结会不断汇总到这里
The text was updated successfully, but these errors were encountered:
No branches or pull requests
对于
chrome
开发入门的一些知识,直接看教程和这里即可,这里不赘述。下面记录一些开发过程中踩过的坑以及解决方案:
manifest.json
文件中,对于图标的定义,仅仅定义一个default-icon
并不能生效,还需要定义一个icons
的值,例如:chrome.storage.sync undefined?
manifest.json
中定义permissions
,否则会获取不到数据“Not allowed to load local resource: chrome://favicon/”
后面的一些经验和总结会不断汇总到这里
The text was updated successfully, but these errors were encountered: