-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackground.js
More file actions
43 lines (37 loc) · 737 Bytes
/
background.js
File metadata and controls
43 lines (37 loc) · 737 Bytes
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
var a,b,intervalId;
chrome.app.window.create('/html/a.html', {
id: 'a',
frame: 'none',
singleton: true,
resizable: true,
bounds: {
left: 100,
top: 100,
width: 300,
height: 300,
}
}, function(w) {
console.log("Created Window A");
a = w;
});
chrome.app.window.create('/html/b.html', {
id: 'b',
frame: 'none',
singleton: true,
resizable: true,
alwaysOnTop: true,
bounds: {
left: window.screen.availWidth - 400,
top: 100,
width: 300,
height: 300,
}
}, function(w) {
console.log("Created Window B");
b = w;
});
console.log("Started TWindows");
intervalId = setInterval(function() {
// Show window b and only window b without stealing focus.
b.show(false);
}, 5000);