-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.js
26 lines (18 loc) · 932 Bytes
/
popup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
chrome.storage.sync.get(['storedIdValue', 'storedPasswordValue'], function(result) {
document.querySelector('.inputId').value = result.storedIdValue;
document.querySelector('.inputPassword').value = result.storedPasswordValue;
});
let idValue = document.querySelector('.inputId').value;
let passwordValue = document.querySelector('.inputPassword').value;
function saveValues() {
setIdValue = document.querySelector('.inputId').value;
chrome.storage.sync.set({'storedIdValue': setIdValue},function name(params) {
}
);
setPasswordValue = document.querySelector('.inputPassword').value;
chrome.storage.sync.set({'storedPasswordValue': setPasswordValue},function name(params) {
}
);
}
document.querySelector('.saveButton').addEventListener("click", saveValues);
// console.log('idValue currently is ' + result.idvalue + ' passwordValue currently is ' + result.passwordvalue);