From df153ee1a1e57e170808c2c36f8acbd689456698 Mon Sep 17 00:00:00 2001 From: Paul-Vincent Roll Date: Mon, 28 Mar 2016 01:59:05 +0200 Subject: [PATCH] Hide menu-bar on Raspberry Pi and some comments --- js/electron.js | 12 ++++++++---- package.json | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/js/electron.js b/js/electron.js index 16482f6d..c61d238c 100755 --- a/js/electron.js +++ b/js/electron.js @@ -15,7 +15,7 @@ let mainWindow; function createWindow () { // Create the browser window. - mainWindow = new BrowserWindow({width: 800, height: 600, fullscreen: true, "node-integration": false}); + mainWindow = new BrowserWindow({width: 800, height: 600, fullscreen: true, "auto-hide-menu-bar": true, "node-integration": false}); // and load the index.html of the app. mainWindow.loadURL('file://' + __dirname + '../../index.html'); @@ -32,19 +32,23 @@ function createWindow () { }); } -//Start helper scripts +//Walk module folder and get file names var module_loader = walk.walk(__dirname + '/../modules', { followLinks: false }); +//for each file in modules module_loader.on('file', function(root, stat, next) { + //if file is called node_helper.js load it if (stat.name == "node_helper.js"){ require(root + '/' + stat.name); + //Log module name + var module = (root + '/' + stat.name).split("/") + console.log("Started helper script for module " + module[module.length-2] + "."); } - next(); }); module_loader.on('end', function() { - console.log("Helpers startet"); + console.log("All helpers started."); }); // This method will be called when Electron has finished diff --git a/package.json b/package.json index b517fc66..68b23972 100755 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "mirror UI" ], "author": "MichMich and others", - "license": "?", + "license": "MIT", "bugs": { "url": "https://github.com/MichMich/MagicMirror/issues" },