-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclearScreen.html
33 lines (33 loc) · 1010 Bytes
/
clearScreen.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Unload File</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
</head>
<body>
<div class="container">
<form>
<div>
<label>Input File Name to be Unloaded</label>
<input type="text" id="fileName" autofocus>
</div>
<button class="btn waves-effect waves-red"
type="button"
onclick="done()">Done</button>
</form>
</div>
<script>
const {ipcRenderer} = require('electron');
function done() {
if (document.querySelector('#fileName').value.length != 0) {
ipcRenderer.send('recall:clear', document.querySelector('#fileName').value);
ipcRenderer.send('screen:main');
console.log('Done with the clear screen');
} else {
console.log('Enter something!');
}
}
</script>
</body>
</html>