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

Side by Side Diff: chrome/browser/resources/ssl/interstitial_v2.js

Issue 321393002: Updated SSL interstitial strings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 6 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
« no previous file with comments | « chrome/browser/resources/ssl/interstitial_v2.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This is the shared code for the new (Chrome 37) security interstitials. It is 5 // This is the shared code for the new (Chrome 37) security interstitials. It is
6 // used for both SSL interstitials and Safe Browsing interstitials. 6 // used for both SSL interstitials and Safe Browsing interstitials.
7 7
8 var expandedDetails = false; 8 var expandedDetails = false;
9 9
10 function setupEvents() { 10 function setupEvents() {
(...skipping 13 matching lines...) Expand all
24 else 24 else
25 sendCommand(CMD_RELOAD); 25 sendCommand(CMD_RELOAD);
26 }); 26 });
27 27
28 if (overridable) { 28 if (overridable) {
29 $('proceed-link').addEventListener('click', function(event) { 29 $('proceed-link').addEventListener('click', function(event) {
30 sendCommand(ssl ? CMD_PROCEED : SB_CMD_PROCEED); 30 sendCommand(ssl ? CMD_PROCEED : SB_CMD_PROCEED);
31 }); 31 });
32 } 32 }
33 33
34 if (!(ssl && overridable)) { // Overridable SSL page doesn't have this link. 34 if (ssl && overridable) {
35 $('proceed-link').classList.add('small-link');
36 } else {
37 // Overridable SSL page doesn't have this link.
35 $('help-link').addEventListener('click', function(event) { 38 $('help-link').addEventListener('click', function(event) {
36 if (ssl) 39 if (ssl)
37 sendCommand(CMD_HELP); 40 sendCommand(CMD_HELP);
38 else if (loadTimeData.getBoolean('phishing')) 41 else if (loadTimeData.getBoolean('phishing'))
39 sendCommand(SB_CMD_REPORT_ERROR); 42 sendCommand(SB_CMD_REPORT_ERROR);
40 else 43 else
41 sendCommand(SB_CMD_SHOW_DIAGNOSTIC); 44 sendCommand(SB_CMD_SHOW_DIAGNOSTIC);
42 }); 45 });
43 46
44 $('error-code').textContent = loadTimeData.getString('errorCode'); 47 $('error-code').textContent = loadTimeData.getString('errorCode');
45 $('error-code').classList.remove('hidden'); 48 $('error-code').classList.remove('hidden');
46 } 49 }
47 50
48 $('details-button').addEventListener('click', function(event) { 51 $('details-button').addEventListener('click', function(event) {
49 var hiddenDetails = $('details').classList.toggle('hidden'); 52 var hiddenDetails = $('details').classList.toggle('hidden');
50 $('details-button').innerText = hiddenDetails ? 53 $('details-button').innerText = hiddenDetails ?
51 loadTimeData.getString('openDetails') : 54 loadTimeData.getString('openDetails') :
52 loadTimeData.getString('closeDetails'); 55 loadTimeData.getString('closeDetails');
53 if (!expandedDetails) { 56 if (!expandedDetails) {
54 // Record a histogram entry only the first time that details is opened. 57 // Record a histogram entry only the first time that details is opened.
55 sendCommand(ssl ? CMD_MORE : SB_CMD_EXPANDED_SEE_MORE); 58 sendCommand(ssl ? CMD_MORE : SB_CMD_EXPANDED_SEE_MORE);
56 expandedDetails = true; 59 expandedDetails = true;
57 } 60 }
58 }); 61 });
59 62
60 preventDefaultOnPoundLinkClicks(); 63 preventDefaultOnPoundLinkClicks();
61 } 64 }
62 65
63 document.addEventListener('DOMContentLoaded', setupEvents); 66 document.addEventListener('DOMContentLoaded', setupEvents);
OLDNEW
« no previous file with comments | « chrome/browser/resources/ssl/interstitial_v2.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698