OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
1 var fileXHREnabled = function() { | 5 var fileXHREnabled = function() { |
2 var xhr = new XMLHttpRequest(); | 6 var xhr = new XMLHttpRequest(); |
3 try { | 7 try { |
4 xhr.onreadystatechange = function() {}; | 8 xhr.onreadystatechange = function() {}; |
5 xhr.onerror = function() {}; | 9 xhr.onerror = function() {}; |
6 xhr.open("GET", "nothing.xml", true); | 10 xhr.open("GET", "nothing.xml", true); |
7 xhr.send(null); | 11 xhr.send(null); |
8 } catch (e) { | 12 } catch (e) { |
9 return false; | 13 return false; |
10 } | 14 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 if (currentBranch == '') { | 73 if (currentBranch == '') { |
70 document.getElementById('unofficialWarning').style.display = 'block'; | 74 document.getElementById('unofficialWarning').style.display = 'block'; |
71 document.getElementById('goToOfficialDocs').onclick = function() { | 75 document.getElementById('goToOfficialDocs').onclick = function() { |
72 location.href = officialURL; | 76 location.href = officialURL; |
73 }; | 77 }; |
74 } else if (currentBranch != 'stable') { | 78 } else if (currentBranch != 'stable') { |
75 document.getElementById("branchName").textContent = | 79 document.getElementById("branchName").textContent = |
76 currentBranch.toUpperCase(); | 80 currentBranch.toUpperCase(); |
77 document.getElementById('branchWarning').style.display = 'block'; | 81 document.getElementById('branchWarning').style.display = 'block'; |
78 document.getElementById('branchChooser').onchange = function() { | 82 document.getElementById('branchChooser').onchange = function() { |
79 location.href = officialURL + this.value; | 83 location.href = officialURL + this.value + "/"; |
80 }; | 84 }; |
81 } | 85 } |
82 } | 86 } |
83 } | 87 } |
OLD | NEW |