16 lines
436 B
JavaScript
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
|
|
})
|