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

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

Issue 23965003: New SSL blocking screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 2 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/roadblock.html ('k') | chrome/browser/resources/ssl/ssl_errors_common.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ssl/roadblock.js
diff --git a/chrome/browser/resources/ssl/roadblock.js b/chrome/browser/resources/ssl/roadblock.js
new file mode 100644
index 0000000000000000000000000000000000000000..8e0d27f15f10c9fa3e61877f16c33e54b31c3351
--- /dev/null
+++ b/chrome/browser/resources/ssl/roadblock.js
@@ -0,0 +1,41 @@
+// 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.
+
+var showedMore = false;
+
+function toggleMoreInfo(collapse) {
+ $('more-info-long').hidden = collapse;
+ $('more-info-short').hidden = !collapse;
+ if (!collapse && !showedMore) {
+ sendCommand(CMD_MORE);
+ showedMore = true;
+ }
+}
+
+// UI modifications and event listeners that take place after load.
+function setupEvents() {
+ $('proceed-button').hidden = false;
+ $('proceed-button').addEventListener('click', function() {
+ sendCommand(CMD_PROCEED);
+ });
+
+ if ($('more-info-title').textContent == '') {
+ $('more-info-short').hidden = true;
+ $('more-info-long').hidden = true;
+ $('twisty-closed').style.display = 'none';
+ } else {
+ $('more-info-short').addEventListener('click', function() {
+ toggleMoreInfo(false);
+ });
+ $('more-info-long').addEventListener('click', function() {
+ toggleMoreInfo(true);
+ });
+ }
+
+ $('exit-button').addEventListener('click', function() {
+ sendCommand(CMD_DONT_PROCEED);
+ });
+}
+
+document.addEventListener('DOMContentLoaded', setupEvents);
« no previous file with comments | « chrome/browser/resources/ssl/roadblock.html ('k') | chrome/browser/resources/ssl/ssl_errors_common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698