summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/managed_mode_block_interstitial.js
blob: 814d19a370a95c47871ea9ca26c375f4f130699e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (c) 2012 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 sendCommand(cmd) {
  window.domAutomationController.setAutomationId(1);
  window.domAutomationController.send(cmd);
}

function initialize() {
  $('bypass-block-button').onclick = function(event) {
    sendCommand('preview');
  }
  $('back-button').onclick = function(event) {
    sendCommand('back');
  };
  $('content-packs-section-button').onclick = function(event) {
    sendCommand('ntp');
  };
}

document.addEventListener('DOMContentLoaded', initialize);