Files
nostr-connect/extension/options.js
2022-01-10 14:11:49 -03:00

16 lines
436 B
JavaScript

/* global document */
import browser from 'webextension-polyfill'
document.getElementById('privateKeyInput').addEventListener('input', ev => {
browser.storage.local
.set({private_key: document.getElementById('privateKeyInput').value})
.then(() => {
console.log('success')
})
})
browser.storage.local.get('private_key').then(results => {
document.getElementById('privateKeyInput').value = results.private_key
})