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

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

Issue 671043002: Offline interstitial mobile fixes (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2171
Patch Set: Created 6 years, 2 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 | « no previous file | 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 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;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 128 }
129 129
130 if (reloadButton.style.display == 'none' && 130 if (reloadButton.style.display == 'none' &&
131 staleLoadButton.style.display == 'none') { 131 staleLoadButton.style.display == 'none') {
132 detailsButton.classList.add('singular'); 132 detailsButton.classList.add('singular');
133 } 133 }
134 134
135 if (templateData) { 135 if (templateData) {
136 // Hide the details button if there are no details to show. 136 // Hide the details button if there are no details to show.
137 if (templateData.summary && !templateData.summary.msg) { 137 if (templateData.summary && !templateData.summary.msg) {
138 detailsButton.hidden = true; 138 detailsButton.style.display = 'none';
139 document.getElementById('help-box-outer').style.display = 'block'; 139 document.getElementById('help-box-outer').style.display = 'block';
140 } 140 }
141 141
142 // Show control buttons. 142 // Show control buttons.
143 if (templateData.reloadButton && templateData.reloadButton.msg || 143 if (templateData.reloadButton && templateData.reloadButton.msg ||
144 templateData.staleLoadButton && templateData.staleLoadButton.msg) { 144 templateData.staleLoadButton && templateData.staleLoadButton.msg) {
145 controlButtonDiv.hidden = false; 145 controlButtonDiv.hidden = false;
146 } 146 }
147 } 147 }
148 } 148 }
149 149
150 document.addEventListener('DOMContentLoaded', setButtonLayout); 150 document.addEventListener('DOMContentLoaded', setButtonLayout);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698