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 var showedMore = false;
7 function toggleMoreInfo(collapse) {
8 $('more-info-long').hidden = collapse;
9 $('more-info-short').hidden = !collapse;
10 if (!collapse && !showedMore) {
11 sendCommand(CMD_MORE);
16 // UI modifications and event listeners that take place after load.
17 function setupEvents() {
18 $('proceed-button').hidden = false;
19 $('proceed-button').addEventListener('click', function() {
20 sendCommand(CMD_PROCEED);
23 if ($('more-info-title').textContent == '') {
24 $('more-info-short').hidden = true;
25 $('more-info-long').hidden = true;
26 $('twisty-closed').style.display = 'none';
28 $('more-info-short').addEventListener('click', function() {
29 toggleMoreInfo(false);
31 $('more-info-long').addEventListener('click', function() {
36 $('exit-button').addEventListener('click', function() {
37 sendCommand(CMD_DONT_PROCEED);
41 document.addEventListener('DOMContentLoaded', setupEvents);