windows95/src/preload.js

21 lines
449 B
JavaScript
Raw Normal View History

2018-08-25 05:55:18 +02:00
const { remote, shell } = require('electron')
const path = require('path')
2018-08-23 07:03:28 +02:00
2018-08-25 05:55:03 +02:00
const { STATE_PATH, resetState, restoreState, saveState } = require('./state')
2018-08-23 07:03:28 +02:00
window.windows95 = {
STATE_PATH,
2018-08-25 05:55:03 +02:00
restoreState,
2018-08-23 07:32:07 +02:00
resetState,
2018-08-25 05:55:03 +02:00
saveState,
2018-08-23 07:32:07 +02:00
2018-08-25 05:55:18 +02:00
showDiskImage() {
const imagePath = path.join(__dirname, 'images/windows95.img')
.replace('app.asar', 'app.asar.unpacked')
2018-08-25 05:55:18 +02:00
shell.showItemInFolder(imagePath)
},
2018-08-25 05:55:03 +02:00
quit: () => remote.app.quit()
2018-08-23 07:03:28 +02:00
}