1 // Copyright (c) 2012 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 if (window.chrome && window.chrome.app && window.chrome.app.isInstalled) {
7 document.getElementById('supported').className = '';
9 document.getElementById('unsupported').className = '';
11 var bgWinUrl = "background.html#yay";
12 var bgWinName = "bgNotifier";
14 function openBackgroundWindow() {
15 window.open(bgWinUrl, bgWinName, "background");
18 function closeBackgroundWindow() {
19 var w = window.open(bgWinUrl, bgWinName, "background");
23 document.addEventListener('DOMContentLoaded', function() {
24 document.querySelector('#openBackgroundWindow').addEventListener(
25 'click', openBackgroundWindow);
26 document.querySelector('#closeBackgroundWindow').addEventListener(
27 'click', closeBackgroundWindow);