Skip to content

Commit 869be2c

Browse files
committed
Ignore icon on older chrome versions
1 parent 156f7e0 commit 869be2c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

background.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@ function startApplication() {
77
innerBounds : {
88
'width' : 1340,
99
'height' : 920
10-
},
11-
icon: 'images/bf_icon_128.png'
10+
}
11+
}, function (createdWindow) {
12+
if (getChromeVersion() >= 54) {
13+
createdWindow.icon = 'images/bf_icon_128.png';
14+
}
1215
});
1316
}
1417

18+
function getChromeVersion () {
19+
var raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
20+
21+
return raw ? parseInt(raw[2], 10) : false;
22+
}
23+
1524
chrome.app.runtime.onLaunched.addListener(startApplication);

0 commit comments

Comments
 (0)