18 lines
288 B
HTML
18 lines
288 B
HTML
|
<html>
|
||
|
<body>
|
||
|
<script>
|
||
|
const fs = require('fs');
|
||
|
const { ipcRenderer } = require('electron');
|
||
|
|
||
|
async function readFile(path) {
|
||
|
await fs.promises.readFile(path);
|
||
|
}
|
||
|
|
||
|
ipcRenderer.on('reload', (_, path) => {
|
||
|
readFile(path);
|
||
|
window.location.reload();
|
||
|
});
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|