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

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

Issue 23434002: DNS probes: several tweaks to error page updating (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix mmenke's nit from the original CL Created 7 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 unified diff | Download patch
« no previous file with comments | « chrome/renderer/resources/neterror.html ('k') | 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 moreLessButton = document.getElementById('more-less-button'); 8 var moreLessButton = document.getElementById('more-less-button');
9 if (helpBoxOuter.classList.contains('hidden')) { 9 if (helpBoxOuter.classList.contains('hidden')) {
10 moreLessButton.innerText = moreLessButton.moreText; 10 moreLessButton.innerText = moreLessButton.moreText;
(...skipping 10 matching lines...) Expand all
21 '/index.html"></iframe>'; 21 '/index.html"></iframe>';
22 } 22 }
23 23
24 // Subframes use a different layout but the same html file. This is to make it 24 // Subframes use a different layout but the same html file. This is to make it
25 // easier to support platforms that load the error page via different 25 // easier to support platforms that load the error page via different
26 // mechanisms (Currently just iOS). 26 // mechanisms (Currently just iOS).
27 if (window.top.location != window.location) 27 if (window.top.location != window.location)
28 document.documentElement.setAttribute('subframe', ''); 28 document.documentElement.setAttribute('subframe', '');
29 29
30 function updateForDnsProbe(strings) { 30 function updateForDnsProbe(strings) {
31 i18nTemplate.process(document, strings);
31 var context = new JsEvalContext(strings); 32 var context = new JsEvalContext(strings);
32 jstProcess(context, document.getElementById('help-box-outer')); 33 jstProcess(context, document.getElementById('t'));
33 jstProcess(context, document.getElementById('details')); 34 }
35
36 function updateIconClass(classList, newClass) {
37 classList.remove('icon-generic');
38 classList.remove('icon-offline');
39 classList.add(newClass);
mmenke 2013/08/26 19:34:42 I wonder about this scaling. Not too bad with two
Deprecated (see juliatuttle) 2013/08/26 20:24:40 Agreed. If it got to be more than two or three, I
Deprecated (see juliatuttle) 2013/08/26 21:44:17 Alright, fixed. It now stashes the last name in a
34 } 40 }
35 41
36 <if expr="is_macosx or is_ios or is_linux or is_android"> 42 <if expr="is_macosx or is_ios or is_linux or is_android">
37 // Re-orders buttons. Used on Mac, Linux, and Android, where reload should go 43 // Re-orders buttons. Used on Mac, Linux, and Android, where reload should go
38 // on the right. 44 // on the right.
39 function swapButtonOrder() { 45 function swapButtonOrder() {
40 reloadButton = document.getElementById('reload-button'); 46 reloadButton = document.getElementById('reload-button');
41 moreLessButton = document.getElementById('more-less-button'); 47 moreLessButton = document.getElementById('more-less-button');
42 reloadButton.parentNode.insertBefore(moreLessButton, reloadButton); 48 reloadButton.parentNode.insertBefore(moreLessButton, reloadButton);
43 } 49 }
44 document.addEventListener("DOMContentLoaded", swapButtonOrder); 50 document.addEventListener("DOMContentLoaded", swapButtonOrder);
45 </if> 51 </if>
OLDNEW
« no previous file with comments | « chrome/renderer/resources/neterror.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698