I tried to put some stuff in the local storage, but when I try to put the information of the local storage in a variable it says "undefined". So here is my code:
var data = {};
chrome.storage.local.get(["murl", "musername", "mpassword"], function(result){
data["url"] = result.murl;
data["username"] = result.musername;
data["password"] = result.mpassword;
alert(result.musername);
});
alert(data["username"]);
It first shows: undefined and then it shows Ebbez, also strange is when I remove the last line, I get Ebbez.