Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: components/data_reduction_proxy/content/resources/interstitial.js

Issue 830503004: Data Reduction Proxy blocking page and resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interstitalStep1
Patch Set: Add webui_resources.pak Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« no previous file with comments | « components/data_reduction_proxy/content/resources/interstitial.html ('k') | components/data_reduction_proxy_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698