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.
6 var content = $('greeting');
7 chrome.firstRunPrivate.getLocalizedStrings(function(strings) {
8 loadTimeData.data = strings;
9 i18nTemplate.process(document, loadTimeData);
10 // Resizing and centering app's window.
12 bounds.width = content.offsetWidth;
13 bounds.height = content.offsetHeight;
14 bounds.left = Math.round(0.5 * (window.screen.availWidth - bounds.width));
15 bounds.top = Math.round(0.5 * (window.screen.availHeight - bounds.height));
16 appWindow.setBounds(bounds);
19 var closeButton = content.getElementsByClassName('close-button')[0];
20 // Make close unfocusable by mouse.
21 closeButton.addEventListener('mousedown', function(e) {
24 closeButton.addEventListener('click', function(e) {
28 var tutorialButton = content.getElementsByClassName('next-button')[0];
29 tutorialButton.addEventListener('click', function(e) {
30 chrome.firstRunPrivate.launchTutorial();
36 document.addEventListener('DOMContentLoaded', init);