Skip to content

Commit

Permalink
Avoid reimporting the same stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
yikuansun committed Mar 31, 2021
1 parent ce124ae commit 9cda258
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
7 changes: 2 additions & 5 deletions window/app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
const { ipcRenderer, remote } = require('electron');
const { app, ipcRenderer, remote } = require('electron');
const { BrowserWindow, Menu } = remote;
const fs = require('fs');
const ioHook = require('iohook');
const os = require('os');
const electron = require('electron');
const userDataPath = (electron.app || electron.remote.app).getPath(
'userData'
);
const userDataPath = (app || remote.app).getPath("userData");

var keycodeNames = JSON.parse(fs.readFileSync(__dirname + "/keycodenames/" + os.platform() + ".json", "utf-8"));

Expand Down
7 changes: 2 additions & 5 deletions window/settings.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
const fs = require('fs');
const { ipcRenderer } = require('electron');
const { app, ipcRenderer, remote } = require('electron');
const customTitlebar = require('custom-electron-titlebar');
const electron = require('electron');
const userDataPath = (electron.app || electron.remote.app).getPath(
'userData'
);
const userDataPath = (app || remote.app).getPath("userData");

new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex('#141414')
Expand Down
7 changes: 2 additions & 5 deletions window/splitsmanager/editsplits.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
const fs = require('fs');
const { ipcRenderer } = require('electron');
const { app, ipcRenderer, remote } = require('electron');
const customTitlebar = require('custom-electron-titlebar');
const electron = require('electron');
const userDataPath = (electron.app || electron.remote.app).getPath(
'userData'
);
const userDataPath = (app || remote.app).getPath("userData");

new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex('#002F63')
Expand Down

0 comments on commit 9cda258

Please sign in to comment.