| Index: components/data_reduction_proxy/content/resources/interstitial.js
|
| diff --git a/components/data_reduction_proxy/content/resources/interstitial.js b/components/data_reduction_proxy/content/resources/interstitial.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a82b4d5800a7dcbc3384c6876a663d5a9c949f62
|
| --- /dev/null
|
| +++ b/components/data_reduction_proxy/content/resources/interstitial.js
|
| @@ -0,0 +1,29 @@
|
| +// Copyright 2015 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.
|
| +
|
| +var expandedDetails = false;
|
| +var keyPressState = 0;
|
| +
|
| +/*
|
| + * A convenience method for sending commands to the parent page.
|
| + * @param {string} cmd The command to send.
|
| + */
|
| +function sendCommand(cmd) {
|
| + window.domAutomationController.setAutomationId(1);
|
| + window.domAutomationController.send(cmd);
|
| +}
|
| +
|
| +function setupEvents() {
|
| + $('primary-button').addEventListener('click', function() {
|
| + sendCommand(DRP_CMD_TAKE_ME_BACK);
|
| + });
|
| +
|
| + $('secondary-button').addEventListener('click', function() {
|
| + sendCommand(DRP_CMD_PROCEED);
|
| + });
|
| +
|
| + preventDefaultOnPoundLinkClicks();
|
| +}
|
| +
|
| +document.addEventListener('DOMContentLoaded', setupEvents);
|
|
|