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

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: Revert details link back to a button 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
« no previous file with comments | « chrome/renderer/resources/neterror.html ('k') | chrome/renderer/resources/offline.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/neterror.js
diff --git a/chrome/renderer/resources/neterror.js b/chrome/renderer/resources/neterror.js
index 14117c4804925bbe1dbda8ebf79adc392e7eba92..ae6efae94ef231530cd3efbc1c3cf453bc608dc3 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').hidden = true;
+ 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');
+ }
+});
« no previous file with comments | « chrome/renderer/resources/neterror.html ('k') | chrome/renderer/resources/offline.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698