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

Side by Side Diff: chrome/renderer/resources/neterror.js

Issue 865943002: Update SSL/malware/net error interstitial design (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix hidden buttons on offline interstitial on CrOS Created 5 years, 11 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 function toggleHelpBox() { 5 function toggleHelpBox() {
6 var helpBoxOuter = document.getElementById('help-box-outer'); 6 var helpBoxOuter = document.getElementById('help-box-outer');
7 helpBoxOuter.classList.toggle('hidden'); 7 helpBoxOuter.classList.toggle('hidden');
8 var detailsButton = document.getElementById('details-button'); 8 var detailsButton = document.getElementById('details-button');
9 if (helpBoxOuter.classList.contains('hidden')) 9 if (helpBoxOuter.classList.contains('hidden'))
10 detailsButton.innerText = detailsButton.detailsText; 10 detailsButton.innerText = detailsButton.detailsText;
11 else 11 else
12 detailsButton.innerText = detailsButton.hideDetailsText; 12 detailsButton.innerText = detailsButton.hideDetailsText;
13
14 // Details appears over the main content on small screens.
15 if (mobileNav)
16 document.getElementById('main-content').classList.toggle('hidden');
13 } 17 }
14 18
15 function diagnoseErrors() { 19 function diagnoseErrors() {
16 var extensionId = 'idddmepepmjcgiedknnmlbadcokidhoa'; 20 var extensionId = 'idddmepepmjcgiedknnmlbadcokidhoa';
17 var diagnoseFrame = document.getElementById('diagnose-frame'); 21 var diagnoseFrame = document.getElementById('diagnose-frame');
18 diagnoseFrame.innerHTML = 22 diagnoseFrame.innerHTML =
19 '<iframe src="chrome-extension://' + extensionId + 23 '<iframe src="chrome-extension://' + extensionId +
20 '/index.html"></iframe>'; 24 '/index.html"></iframe>';
21 } 25 }
22 26
(...skipping 23 matching lines...) Expand all
46 50
47 classList.add(newClass); 51 classList.add(newClass);
48 if (oldClass !== undefined) 52 if (oldClass !== undefined)
49 classList.remove(oldClass); 53 classList.remove(oldClass);
50 54
51 classList['last_icon_class'] = newClass; 55 classList['last_icon_class'] = newClass;
52 56
53 if (newClass == 'icon-offline') { 57 if (newClass == 'icon-offline') {
54 document.body.classList.add('offline'); 58 document.body.classList.add('offline');
55 new Runner('.interstitial-wrapper'); 59 new Runner('.interstitial-wrapper');
60 } else {
61 document.body.classList.add('neterror');
56 } 62 }
57 } 63 }
58 64
59 // Does a search using |baseSearchUrl| and the text in the search box. 65 // Does a search using |baseSearchUrl| and the text in the search box.
60 function search(baseSearchUrl) { 66 function search(baseSearchUrl) {
61 var searchTextNode = document.getElementById('search-box'); 67 var searchTextNode = document.getElementById('search-box');
62 document.location = baseSearchUrl + searchTextNode.value; 68 document.location = baseSearchUrl + searchTextNode.value;
63 return false; 69 return false;
64 } 70 }
65 71
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 154
149 // Add a main message paragraph. 155 // Add a main message paragraph.
150 if (loadTimeData.valueExists('primaryParagraph')) { 156 if (loadTimeData.valueExists('primaryParagraph')) {
151 var p = document.querySelector('#main-message p'); 157 var p = document.querySelector('#main-message p');
152 p.innerHTML = loadTimeData.getString('primaryParagraph'); 158 p.innerHTML = loadTimeData.getString('primaryParagraph');
153 p.hidden = false; 159 p.hidden = false;
154 } 160 }
155 } 161 }
156 162
157 document.addEventListener('DOMContentLoaded', onDocumentLoad); 163 document.addEventListener('DOMContentLoaded', onDocumentLoad);
OLDNEW
« chrome/renderer/resources/neterror.html ('K') | « chrome/renderer/resources/neterror.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698