-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrenderer.js
36 lines (35 loc) · 849 Bytes
/
renderer.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
27
28
29
30
31
32
33
34
35
36
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
const {ipcRenderer} = require('electron')
localforage.removeItem('user', function(err) {
console.log("clear");
});
$(".start").on("click",(e) => {
e.preventDefault();
obj = {
"name" : name,
"number": number,
"voice": voice
};
if(number && name) {
localforage.setItem('user', obj,(err,value)=> {
console.log(value);
});
}
if(obj.name && obj.number) {
ipcRenderer.send("test")
}
})
var name;
var number,voice=false;
var obj;
$("#name").change(() => {
name = ($("#name").val());
});
$("#number").change(() => {
number = ($("#number").val());
});
$("#voice").change(() => {
voice = ($("#voice").prop("checked"));
});