-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
41 lines (34 loc) · 861 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
'use strict';
const electron = require('electron');
const app = electron.app;
var _window = null;
/*
WINDOW JUNK
*/
app.on('window-all-closed', function() {
// On OS X, we don't quit the program when all windows are closed (usually)
if (process.platform != 'darwin')
app.quit();
});
app.on('ready', function() {
_window = new electron.BrowserWindow({
"width": 900,
"height": 800,
"directWrite": false,
"textAreasAreResizable": false,
"webPreferences": {
"nodeIntegration": false
}
});
_window.setMenuBarVisibility(false);
_window.loadURL('https://messenger.com');
_window.webContents.on('did-finish-load', function() {
_window.webContents.executeJavaScript(`
document.getElementsByClassName('_s15')[0].style.display = "none";
`);
});
// CLEAN-UP Window
_window.on('closed', function() {
_window = null;
});
});