在我的扩展中,我将某些域的设置设置为chrome.storage.local
以下格式:
{
domainSettings: {
google.com.au: {
setting: "someSetting",
anotherSetting: "somethingElse"
},
stackoverflow.com: {
setting: "someOtherSetting"
anotherSetting: "somethingElseAswell"
}
}
otherSettings: {
...
}
}
而不是使用chrome.storage.local.get("domainSettings", function(response){})
获取每个域的设置,然后只获取我需要的设置,我怎样才能获取 justgoogle.com.au
的设置。
当我只需要一个时,似乎没有必要获得数百或数千倍的信息。
干杯。