Get credentials in background page js
This commit is contained in:
parent
ed58ab0c0f
commit
0c29772555
@ -1 +1,13 @@
|
|||||||
|
const browser = require("webextension-polyfill");
|
||||||
console.log("Executing Urbit extension background main script");
|
console.log("Executing Urbit extension background main script");
|
||||||
|
|
||||||
|
browser.storage.sync.get("credentials")
|
||||||
|
.then((result) => {
|
||||||
|
console.log(result);
|
||||||
|
if (result.credentials && result.credentials.urbitId && result.credentials.urbitCode) {
|
||||||
|
console.log("Creds:");
|
||||||
|
console.log(result.credentials);
|
||||||
|
} else {
|
||||||
|
console.log("Couldn't find credentials");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user