-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.js
More file actions
65 lines (52 loc) · 1.45 KB
/
functions.js
File metadata and controls
65 lines (52 loc) · 1.45 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
const electron = require('electron');
const path = require('path');
const url = require('url');
function myFunction() {
alert("quack");
}
var myVar = new Date();
var windows = [[null,null,null],[null,null,null],[null,null,null]];
function newWindow() {
const remote = require('electron').remote;
const BrowserWindow = remote.BrowserWindow;
var win2 = new BrowserWindow({ width: 400,
height: 300,
frame: false});
win2.setPosition(0, 0)
win2.show();
}
var screenElectron = electron.screen;
var mainScreen = screenElectron.getPrimaryDisplay();
var width = mainScreen.bounds.width;
var height = mainScreen.bounds.height;
var BrowserWindow = electron.remote.BrowserWindow;
function newGame() {
for (var i in windows) {
for (var j in windows[i]) {
windows[i][j] = new BrowserWindow({
width: (width / 3),
height: (height/3)
});
windows[i][j].setPosition(( (j / 3) * width), ( (i / 3) * height));
windows[i][j].loadURL(url.format({
pathname: path.join(__dirname, 'slacka.html'),
protocol: 'file:',
slashes: true
}));
}
}
setInterval(click, 100);
}
var count = 0;
function click() {
count++;
if (count % 100) {
for (var i in windows) {
for (var j in windows[i]) {
if (Math.random() > .99) {
windows[i][j].webContents.send('index', j);
}
}
}
}
}