[英]Accessing chrome.storage.sync
I am working on a chrome extension that has 30 checkboxes on the options page. 我正在使用的Chrome扩展程序在选项页面上具有30个复选框。 I am trying to save which checkboxes are checked using 我正在尝试保存使用哪个复选框
var jsonfile={};
document.getElementById("teamdiv").addEventListener('change',function(e){
jsonfile[e.target.id+""]=true;
storeValue(jsonfile);
});
How can I retrieve all the values inside the jsonfile inside a different javascript file without having a seperate 如何在不使用单独的javascript文件的情况下检索jsonfile内的所有值
chrome.storage.sync.get()
statement? 声明? Thanks in advance. 提前致谢。
Use Background Script in extension backgoundscript to communicate between pages 在扩展backgoundscript中使用背景脚本在页面之间进行通信
{
"name": "My extension",
...
"background": {
"scripts": ["background.js"]
},
...
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.