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

Side by Side Diff: chrome/browser/resources/safe_browsing/safe_browsing_v3.js

Issue 319193002: Update the malware interstitial to have the new layout (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Round 2 of edits 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 | « no previous file | chrome/browser/resources/ssl/interstitial_v2.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Must match the commands handled by SafeBrowsingBlockingPage::CommandReceived.
6 var SB_CMD_BOX_CHECKED = 'boxchecked';
7 var SB_CMD_DISPLAY_CHECK = 'displaycheckbox';
8 var SB_CMD_DO_REPORT = 'doReport';
9 var SB_CMD_DONT_REPORT = 'dontReport';
10 var SB_CMD_EXPANDED_MORE = 'expandedSeeMore';
Bernhard Bauer 2014/06/09 15:43:00 And this one is kExpandedSeeMore (without Command.
felt 2014/06/09 16:55:27 Done. I don't want to add Command to the end of t
Bernhard Bauer 2014/06/09 17:17:10 Yes, I like that (and I was just lamenting about t
felt 2014/06/09 18:01:36 I'm not sure what distinction you're drawing betwe
Bernhard Bauer 2014/06/09 21:48:27 No, kBoxChecked and kDisplayCheckBox are used as k
felt 2014/06/10 05:21:02 Separated them out.
11 var SB_CMD_LEARN_MORE_2 = 'learnMore2';
12 var SB_CMD_PROCEED = 'proceed';
13 var SB_CMD_REPORT_ERROR = 'reportError';
14 var SB_CMD_SHOW_DIAGNOSTIC = 'showDiagnostic';
15 var SB_CMD_SHOW_PRIVACY = 'showPrivacy';
16 var SB_CMD_TAKE_ME_BACK = 'takeMeBack';
17
18 function applyMalwareStyle() {
19 // Dynamically add the second and third paragraphs.
20 var secondParagraph = document.createTextNode(
21 loadTimeData.getString('secondParagraph'));
22 $('second-paragraph').appendChild(secondParagraph);
23 if (!loadTimeData.getBoolean('phishing')) {
24 var thirdParagraph = document.createTextNode(
25 loadTimeData.getString('thirdParagraph'));
26 $('third-paragraph').appendChild(thirdParagraph);
27 }
28
29 // Add the link to the diagnostic page (malware) or reporting (phishing).
30 // TODO(felt): Put the link definition into the grd file once we have new
31 // wording.
32 var detailsText = document.createTextNode(
33 loadTimeData.getString('detailsText'));
34 var detailsLink = document.createElement('a');
35 detailsLink.setAttribute('href', '#');
36 detailsLink.setAttribute('id', 'help-link');
37 detailsLink.appendChild(detailsText);
38 $('explanation-paragraph').appendChild(detailsLink);
39
40 // Add the link to proceed.
41 if (loadTimeData.getBoolean('overridable')) {
42 var proceedText = document.createTextNode(
43 loadTimeData.getString('proceedText'));
44 var proceedLink = document.createElement('a');
45 proceedLink.setAttribute('href', '#');
46 proceedLink.setAttribute('id', 'proceed-link');
47 proceedLink.appendChild(proceedText);
48 $('final-paragraph').appendChild(proceedLink);
49 }
50
51 // Make the background red.
52 $('icon').classList.add('icon-malware');
53 $('body').classList.add('body-red');
54 $('primary-button').classList.add('button-red');
55 var links = document.getElementsByTagName('a');
56 for (var i = 0; i < links.length; i++)
57 links[i].classList.add('a-red');
58
59 // Remove the 'hidden' class from the paragraphs that we use.
60 $('second-paragraph').classList.toggle('hidden');
61 if (!loadTimeData.getBoolean('phishing'))
62 $('third-paragraph').classList.toggle('hidden');
63 $('explanation-paragraph').classList.toggle('hidden');
64 $('final-paragraph').classList.toggle('hidden');
65 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/ssl/interstitial_v2.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698