diff --git a/activity-monitor/app.js b/activity-monitor/app.js index fb610d4..1a8518f 100644 --- a/activity-monitor/app.js +++ b/activity-monitor/app.js @@ -17,7 +17,11 @@ app.once('ready', () => { // set the background color to black backgroundColor: "#111", // Don't show the window until it's ready, this prevents any white flickering - show: false + show: false, + // Set nodeIntegration true //default false + webPreferences:{ + nodeIntegration:true + } }) window.loadURL(url.format({ diff --git a/activity-monitor/package.json b/activity-monitor/package.json index f793e6f..9df549b 100644 --- a/activity-monitor/package.json +++ b/activity-monitor/package.json @@ -9,6 +9,6 @@ }, "license": "ISC", "devDependencies": { - "electron": "^3.0.2" + "electron": "^7.1.7" } } diff --git a/electron-tray/package.json b/electron-tray/package.json index a0c9f5d..9667cc0 100644 --- a/electron-tray/package.json +++ b/electron-tray/package.json @@ -9,6 +9,6 @@ }, "license": "ISC", "devDependencies": { - "electron": "^3.0.2" + "electron": "^7.1.7" } } diff --git a/hash/app.js b/hash/app.js index e24b0b7..f938a36 100644 --- a/hash/app.js +++ b/hash/app.js @@ -16,7 +16,11 @@ app.once('ready', () => { // background color of the page, this prevents any white flickering backgroundColor: "#D6D8DC", // Don't show the window until it's ready, this prevents any white flickering - show: false + show: false, + // Set nodeIntegration true //default false + webPreferences:{ + nodeIntegration:true + } }) // Load a URL in the window to the local index.html path diff --git a/hash/package.json b/hash/package.json index 5f80874..a6bfeb1 100644 --- a/hash/package.json +++ b/hash/package.json @@ -9,6 +9,6 @@ }, "license": "ISC", "devDependencies": { - "electron": "^3.0.2" + "electron": "^7.1.7" } } diff --git a/mirror/app.js b/mirror/app.js index c2fb4fc..2dc2b26 100644 --- a/mirror/app.js +++ b/mirror/app.js @@ -13,7 +13,11 @@ app.once('ready', () => { // Make the window transparent transparent: true, // Remove the frame from the window - frame: false + frame: false, + // Set nodeIntegration true //default false + webPreferences:{ + nodeIntegration:true + } }) // Load a URL in the window to the local index.html path diff --git a/mirror/package.json b/mirror/package.json index 3d70f48..c3f6733 100644 --- a/mirror/package.json +++ b/mirror/package.json @@ -9,6 +9,6 @@ }, "license": "ISC", "devDependencies": { - "electron": "^3.0.2" + "electron": "^7.1.7" } } diff --git a/mirror/window.js b/mirror/window.js index bd5a5dc..c97cf48 100644 --- a/mirror/window.js +++ b/mirror/window.js @@ -1,8 +1,11 @@ // Run this function after the page has loaded $(() => { - const electron = require('electron') + const {remote} = require('electron') + + // get screen through remote module + const {screen}=remote - const display = electron.screen.getPrimaryDisplay() // http://electron.atom.io/docs/api/screen + const display = screen.getPrimaryDisplay() // http://electron.atom.io/docs/api/screen const constraints = { video: { diff --git a/prices/app.js b/prices/app.js index 542784a..1c6c5d3 100644 --- a/prices/app.js +++ b/prices/app.js @@ -15,7 +15,11 @@ app.once('ready', () => { // Don't show the window until it ready, this prevents any white flickering show: false, // Don't allow the window to be resized. - resizable: false + resizable: false, + // Set nodeIntegration true //default false + webPreferences:{ + nodeIntegration:true + } }) // Load a URL in the window to the local index.html path diff --git a/prices/package.json b/prices/package.json index 79d6522..9369d51 100644 --- a/prices/package.json +++ b/prices/package.json @@ -9,7 +9,7 @@ }, "license": "ISC", "devDependencies": { - "electron": "^3.0.2" + "electron": "^7.1.7" }, "dependencies": { "papaparse": "^4.6.0" diff --git a/url/package.json b/url/package.json index 0e162d3..1e295ca 100644 --- a/url/package.json +++ b/url/package.json @@ -9,6 +9,6 @@ }, "license": "ISC", "devDependencies": { - "electron": "^3.0.2" + "electron": "^7.1.7" } }