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

Side by Side 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: html/js fixes 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var expandedDetails = false;
6 var touch = 'touchend';
7 var click = 'click';
8
9 function toggleDetails() {
10 $('details').classList.toggle('hidden');
11 $('details-button').innerText = $('details').classList.contains('hidden') ?
12 templateData.openDetails : templateData.closeDetails;
13 if (!expandedDetails) {
14 // Record a histogram entry only the first time that details is opened.
15 sendCommand(CMD_MORE);
16 expandedDetails = true;
17 }
18 }
19
20 function setupEvents() {
21 $('safety-button').addEventListener(touch, function() {
22 sendCommand(CMD_DONT_PROCEED);
23 });
24 $('safety-button').addEventListener(click, function() {
25 sendCommand(CMD_DONT_PROCEED);
Bernhard Bauer 2014/05/27 14:13:34 Alternatively, you could assign the two event name
26 });
27
28 $('proceed-link').addEventListener(touch, function() {
29 sendCommand(CMD_PROCEED);
30 });
31 $('proceed-link').addEventListener(click, function() {
32 sendCommand(CMD_PROCEED);
33 });
34
35 $('details-button').addEventListener(touch, toggleDetails);
36 $('details-button').addEventListener(click, toggleDetails);
37 }
38
39 document.addEventListener('DOMContentLoaded', setupEvents);
OLDNEW
« 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