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

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

Issue 1583693005: Update network error interstitial strings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add heading dictionary Created 4 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
« no previous file with comments | « chrome/renderer/resources/neterror.html ('k') | components/components_chromium_strings.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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('details'); 6 var helpBoxOuter = document.getElementById('details');
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;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 setUpCachedButton(loadTimeData.getValue('cacheButton')); 202 setUpCachedButton(loadTimeData.getValue('cacheButton'));
203 } 203 }
204 204
205 if (reloadButton.style.display == 'none' && 205 if (reloadButton.style.display == 'none' &&
206 showSavedCopyButton.style.display == 'none' && 206 showSavedCopyButton.style.display == 'none' &&
207 showOfflinePagesButton.style.display == 'none' && 207 showOfflinePagesButton.style.display == 'none' &&
208 showOfflineCopyButton.style.display == 'none') { 208 showOfflineCopyButton.style.display == 'none') {
209 detailsButton.classList.add('singular'); 209 detailsButton.classList.add('singular');
210 } 210 }
211 211
212 <if expr="not chromeos">
213 // Hide the details button if there are no details to show.
214 if (loadTimeData.valueExists('summary') &&
215 !loadTimeData.getValue('summary').msg) {
216 detailsButton.style.display = 'none';
217 }
218 </if>
219
220 // Show control buttons. 212 // Show control buttons.
221 if (reloadButtonVisible || showSavedCopyButtonVisible || 213 if (reloadButtonVisible || showSavedCopyButtonVisible ||
222 showOfflinePagesButtonVisible || showOfflineCopyButton) { 214 showOfflinePagesButtonVisible || showOfflineCopyButton) {
223 controlButtonDiv.hidden = false; 215 controlButtonDiv.hidden = false;
224 216
225 // Set the secondary button state in the cases of two call to actions. 217 // Set the secondary button state in the cases of two call to actions.
226 if ((reloadButtonVisible || showOfflinePagesButtonVisible || 218 if ((reloadButtonVisible || showOfflinePagesButtonVisible ||
227 showOfflineCopyButton) && 219 showOfflineCopyButton) &&
228 showSavedCopyButtonVisible) { 220 showSavedCopyButtonVisible) {
229 secondaryButton.classList.add('secondary-button'); 221 secondaryButton.classList.add('secondary-button');
230 } 222 }
231 } 223 }
232
233 // Add a main message paragraph.
234 if (loadTimeData.valueExists('primaryParagraph')) {
235 var p = document.querySelector('#main-message p');
236 p.innerHTML = loadTimeData.getString('primaryParagraph');
237 p.hidden = false;
238 }
239 } 224 }
240 225
241 document.addEventListener('DOMContentLoaded', onDocumentLoad); 226 document.addEventListener('DOMContentLoaded', onDocumentLoad);
OLDNEW
« no previous file with comments | « chrome/renderer/resources/neterror.html ('k') | components/components_chromium_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698