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

Unified Diff: chrome/browser/resources/ssl/overridable_v2.js

Issue 294343004: New SSL interstitial (behind Finch flag) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed spurious OVERRIDE Created 6 years, 7 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
« no previous file with comments | « chrome/browser/resources/ssl/overridable_v2.html ('k') | chrome/browser/ssl/ssl_blocking_page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ssl/overridable_v2.js
diff --git a/chrome/browser/resources/ssl/overridable_v2.js b/chrome/browser/resources/ssl/overridable_v2.js
new file mode 100644
index 0000000000000000000000000000000000000000..22c0346c5149bba1172bcbe85b24b2f532eac87e
--- /dev/null
+++ b/chrome/browser/resources/ssl/overridable_v2.js
@@ -0,0 +1,31 @@
+// Copyright 2014 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;
+
+function setupEvents() {
+ $('safety-button').addEventListener('click', function() {
+ sendCommand(CMD_DONT_PROCEED);
+ });
+
+ $('proceed-link').addEventListener('click', function(event) {
+ sendCommand(CMD_PROCEED);
+ event.preventDefault(); // Don't let the fragment navigate.
+ });
+
+ $('details-button').addEventListener('click', function(event) {
+ var hiddenDetails = $('details').classList.toggle('hidden');
+ $('details-button').innerText = hiddenDetails ?
+ loadTimeData.getString('openDetails') :
+ loadTimeData.getString('closeDetails');
+ if (!expandedDetails) {
+ // Record a histogram entry only the first time that details is opened.
+ sendCommand(CMD_MORE);
+ expandedDetails = true;
+ }
+ event.preventDefault(); // Don't let the fragment navigate.
+ });
+}
+
+document.addEventListener('DOMContentLoaded', setupEvents);
« no previous file with comments | « chrome/browser/resources/ssl/overridable_v2.html ('k') | chrome/browser/ssl/ssl_blocking_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698