📅  最后修改于: 2022-03-11 15:01:49.049000             🧑  作者: Mango
function loadJiraUrlElements() {
return new Promise(function(resolve, reject) {
chrome.storage.local.get({companyName: '', jiraBaseUrl: ''}, function(items) {
resolve(items.companyName + items.jiraBaseUrl);
})
});
}
// And caller function changes to
function populateUrlFieldsWithUrlElements(){
loadJiraUrlElements().then(function(value) {
companyInput.value = value;
})
}