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

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

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
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
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 11 matching lines...) Expand all
22 22
23 // Subframes use a different layout but the same html file. This is to make it 23 // Subframes use a different layout but the same html file. This is to make it
24 // easier to support platforms that load the error page via different 24 // easier to support platforms that load the error page via different
25 // mechanisms (Currently just iOS). 25 // mechanisms (Currently just iOS).
26 if (window.top.location != window.location) 26 if (window.top.location != window.location)
27 document.documentElement.setAttribute('subframe', ''); 27 document.documentElement.setAttribute('subframe', '');
28 28
29 // Re-renders the error page using |strings| as the dictionary of values. 29 // Re-renders the error page using |strings| as the dictionary of values.
30 // Used by NetErrorTabHelper to update DNS error pages with probe results. 30 // Used by NetErrorTabHelper to update DNS error pages with probe results.
31 function updateForDnsProbe(strings) { 31 function updateForDnsProbe(strings) {
32 i18nTemplate.process(document, strings);
Dan Beam 2014/09/24 00:03:30 ^ does this already happen somewhere else and it w
Evan Stade 2014/09/24 21:57:18 Yea, it already happens at page startup; AFAICT th
33 var context = new JsEvalContext(strings); 32 var context = new JsEvalContext(strings);
34 jstProcess(context, document.getElementById('t')); 33 jstProcess(context, document.getElementById('t'));
35 } 34 }
36 35
37 // Given the classList property of an element, adds an icon class to the list 36 // Given the classList property of an element, adds an icon class to the list
38 // and removes the previously- 37 // and removes the previously-
39 function updateIconClass(classList, newClass) { 38 function updateIconClass(classList, newClass) {
40 var oldClass; 39 var oldClass;
41 40
42 if (classList.hasOwnProperty('last_icon_class')) { 41 if (classList.hasOwnProperty('last_icon_class')) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 133 }
135 } 134 }
136 135
137 document.addEventListener('DOMContentLoaded', function() { 136 document.addEventListener('DOMContentLoaded', function() {
138 setButtonLayout(); 137 setButtonLayout();
139 if (document.querySelector('.icon-offline')) { 138 if (document.querySelector('.icon-offline')) {
140 document.body.classList.add('offline'); 139 document.body.classList.add('offline');
141 new Runner('.interstitial-wrapper'); 140 new Runner('.interstitial-wrapper');
142 } 141 }
143 }); 142 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698