diff --git a/main.js b/main.js
index ab8e3dd..3994ddc 100644
--- a/main.js
+++ b/main.js
@@ -5,12 +5,20 @@ const shell = require('electron').shell
let win
+app.inspect = function()
+{
+ win.webContents.openDevTools();
+}
+
+app.inject_menu = function(m)
+{
+ Menu.setApplicationMenu(Menu.buildFromTemplate(m));
+}
+
app.on('ready', () =>
{
win = new BrowserWindow({width: 400, height: 420, minWidth: 400, minHeight: 400, backgroundColor:"#000", frame:false, autoHideMenuBar: true, icon: __dirname + '/icon.ico'})
- win.loadURL(`file://${__dirname}/sources/index.html`)
-
let is_shown = true;
Menu.setApplicationMenu(Menu.buildFromTemplate([
@@ -28,6 +36,12 @@ app.on('ready', () =>
}
]));
+ win.loadURL(`file://${__dirname}/sources/index.html`)
+
+ win.webContents.on('did-finish-load', () => {
+ win.webContents.send('controller-access', "hello");
+ })
+
win.on('closed', () => {
win = null
app.quit()
@@ -38,6 +52,7 @@ app.on('ready', () =>
})
win.on('show',function() {
+ var something = {name:"fuck"}
is_shown = true;
})
})
diff --git a/sources/index.html b/sources/index.html
index b8a4235..bb640c8 100644
--- a/sources/index.html
+++ b/sources/index.html
@@ -11,6 +11,7 @@
+
@@ -22,7 +23,7 @@