summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/ssl/blocking.js
blob: 6442c386fdbf3a5925166154465570815e7e0b2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

function toggleMoreBox() {
  var helpBoxOuter = $('help-box-outer');
  helpBoxOuter.classList.toggle('hidden');
  var moreLessButton = $('more-less-button');
  if (helpBoxOuter.classList.contains('hidden')) {
    moreLessButton.innerText = templateData.more;
  } else {
    moreLessButton.innerText = templateData.less;
  }
}

function reloadPage() {
  sendCommand(CMD_RELOAD);
}

function setupEvents() {
  $('reload-button').addEventListener('click', reloadPage);
  $('more-less-button').addEventListener('click', toggleMoreBox);
}

document.addEventListener('DOMContentLoaded', setupEvents);