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

Unified Diff: chrome/renderer/resources/neterror.js

Issue 545973003: Update network error template to new design (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove debug code from JS file. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/neterror.js
diff --git a/chrome/renderer/resources/neterror.js b/chrome/renderer/resources/neterror.js
index 14117c4804925bbe1dbda8ebf79adc392e7eba92..3aed27d105f26e76896879f30959cf7b72b16a19 100644
--- a/chrome/renderer/resources/neterror.js
+++ b/chrome/renderer/resources/neterror.js
@@ -126,5 +126,18 @@ function setButtonLayout() {
staleLoadButton.style.display == 'none') {
detailsButton.classList.add('singular');
}
+
+ // Hide the details button if there are no details to show.
+ if (templateData && templateData.summary && !templateData.summary.msg) {
+ document.getElementById('details-button').classList.add('hidden');
arv (Not doing code reviews) 2014/09/15 17:35:43 How about just using .hidden instead of class hidd
edwardjung 2014/09/16 13:14:30 Done. Thanks for the tip.
+ document.getElementById('help-box-outer').style.display = 'block';
+ }
}
-document.addEventListener('DOMContentLoaded', setButtonLayout);
+
+document.addEventListener('DOMContentLoaded', function() {
+ setButtonLayout();
+ if (document.querySelector('.icon-offline')) {
+ document.body.classList.add('offline');
+ new Runner('.interstitial-wrapper');
+ }
+ });

Powered by Google App Engine
This is Rietveld 408576698