mirror of https://github.com/axmolengine/axmol.git
17 lines
402 B
JavaScript
17 lines
402 B
JavaScript
chrome.app.runtime.onLaunched.addListener(function() {
|
|
var screenWidth = screen.availWidth;
|
|
var screenHeight = screen.availHeight;
|
|
var width = 800;
|
|
var height = 640;
|
|
|
|
chrome.app.window.create('index.html', {
|
|
width: width,
|
|
height: height,
|
|
minWidth: width,
|
|
minHeight: height,
|
|
type: 'panel',
|
|
left: (screenWidth-width)/2,
|
|
top: (screenHeight-height)/2
|
|
});
|
|
});
|