Files
chrome-extensions-samples/apps/samples/mini-code-edit/background.js
Sam Thorogood 8af19b8ca9 move
2020-12-04 09:18:01 +11:00

22 lines
689 B
JavaScript
Executable File

chrome.app.runtime.onLaunched.addListener(function() {
// width 640 for font size 12
// 720 for font size 14
chrome.app.window.create('main.html', {
frame: 'chrome', id: "codewin", innerBounds: { width: 720, height: 400, minWidth:720, minHeight: 400 }
});
});
/**
* Set up the Commands listener event
* @see http://developer.chrome.com/apps/commands.html
*/
chrome.commands.onCommand.addListener(function(command) {
console.log("Command triggered: " + command);
if (command == "cmdNew") {
chrome.app.window.create('main.html', {
frame: 'chrome', id: "codewin", innerBounds: { width: 720, height: 400, minWidth:720, minHeight: 400 }
});
}
});