1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 chrome.app.runtime.onLaunched.addListener(function() {
7 var screenWidth = screen.availWidth;
8 var screenHeight = screen.availHeight;
12 chrome.app.window.create('index.html', {
16 left: Math.round((screenWidth-width)/2),
17 top: Math.round((screenHeight-height)/2)
22 chrome.runtime.onSuspend.addListener(function() {
24 chrome.storage.local.set({"last_save": now.toLocaleString()}, function() {
25 console.log("Finished writing last_save: " + now.toLocaleString());