Skip to content

Commit 319dac0

Browse files
committed
Remove standard errors
1 parent 2854629 commit 319dac0

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ electron.hideInternalModules()
99
process.throwDeprecation = true
1010

1111
// Require and setup each JS file in the main-process dir
12-
glob(__dirname + '/main-process/**/*.js', function (error, files) {
12+
glob(path.join(__dirname, 'main-process/**/*.js'), function (error, files) {
1313
if (error) return console.log(error)
1414
files.forEach(function (file) {
1515
require(file)
@@ -19,7 +19,7 @@ glob(__dirname + '/main-process/**/*.js', function (error, files) {
1919
function createWindow () {
2020
var iconPath = path.join(__dirname, '/assets/app-icon/png/512.png')
2121
mainWindow = new BrowserWindow({ width: 1080, minWidth: 680, height: 800, icon: iconPath })
22-
mainWindow.loadURL('file://' + __dirname + '/index.html')
22+
mainWindow.loadURL('file://' + path.join(__dirname, 'index.html'))
2323
mainWindow.on('closed', function () {
2424
mainWindow = null
2525
})

renderer-process/communication/invisible-msg.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
var BrowserWindow = require('electron').remote.BrowserWindow
22
var ipcRenderer = require('electron').ipcRenderer
3+
var path = require('path')
34

45
var invisMsgBtn = document.getElementById('invis-msg')
56
var invisReply = document.getElementById('invis-reply')
67

78
invisMsgBtn.addEventListener('click', function (clickEvent) {
89
var windowID = BrowserWindow.getFocusedWindow().id
9-
var invisPath = 'file://' + __dirname + '/sections/communication/invisible.html'
10+
var invisPath = 'file://' + path.join(__dirname, 'sections/communication/invisible.html')
1011
var win = new BrowserWindow({ width: 400, height: 400, show: false })
1112
win.loadURL(invisPath)
1213

renderer-process/windows/create-window.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
var BrowserWindow = require('electron').remote.BrowserWindow
2+
var path = require('path')
3+
24
var newWindowBtn = document.getElementById('new-window')
35

46
newWindowBtn.addEventListener('click', function (event) {
5-
var modalPath = 'file://' + __dirname + '/sections/windows/modal.html'
7+
var modalPath = 'file://' + path.join(__dirname, 'sections/windows/modal.html')
68
var win = new BrowserWindow({ width: 400, height: 320 })
79
win.on('closed', function () { win = null })
810
win.loadURL(modalPath)

renderer-process/windows/manage-window.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
var BrowserWindow = require('electron').remote.BrowserWindow
2+
var path = require('path')
3+
24
var manageWindowBtn = document.getElementById('manage-window')
35

46
manageWindowBtn.addEventListener('click', function (event) {
5-
var modalPath = 'file://' + __dirname + '/sections/windows/manage-modal.html'
7+
var modalPath = 'file://' + path.join(__dirname, 'sections/windows/manage-modal.html')
68
var win = new BrowserWindow({ width: 400, height: 225 })
79

810
win.on('resize', updateReply)

0 commit comments

Comments
 (0)